opencode-skills-antigravity 1.0.13 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled-skills/app-store-changelog/SKILL.md +75 -0
- package/bundled-skills/app-store-changelog/agents/openai.yaml +4 -0
- package/bundled-skills/app-store-changelog/references/release-notes-guidelines.md +34 -0
- package/bundled-skills/app-store-changelog/scripts/collect_release_changes.sh +33 -0
- package/bundled-skills/docs/integrations/jetski-cortex.md +3 -3
- package/bundled-skills/docs/integrations/jetski-gemini-loader/README.md +1 -1
- package/bundled-skills/docs/maintainers/repo-growth-seo.md +14 -14
- package/bundled-skills/docs/maintainers/skills-update-guide.md +1 -1
- package/bundled-skills/docs/sources/sources.md +10 -0
- package/bundled-skills/docs/users/bundles.md +9 -1
- package/bundled-skills/docs/users/claude-code-skills.md +5 -1
- package/bundled-skills/docs/users/codex-cli-skills.md +8 -0
- package/bundled-skills/docs/users/cursor-skills.md +4 -0
- package/bundled-skills/docs/users/faq.md +45 -0
- package/bundled-skills/docs/users/gemini-cli-skills.md +5 -1
- package/bundled-skills/docs/users/getting-started.md +1 -1
- package/bundled-skills/docs/users/kiro-integration.md +1 -1
- package/bundled-skills/docs/users/skills-vs-mcp-tools.md +89 -0
- package/bundled-skills/docs/users/usage.md +14 -4
- package/bundled-skills/docs/users/visual-guide.md +4 -4
- package/bundled-skills/github/SKILL.md +76 -0
- package/bundled-skills/github/agents/openai.yaml +4 -0
- package/bundled-skills/ios-debugger-agent/SKILL.md +59 -0
- package/bundled-skills/ios-debugger-agent/agents/openai.yaml +4 -0
- package/bundled-skills/macos-menubar-tuist-app/SKILL.md +109 -0
- package/bundled-skills/macos-menubar-tuist-app/agents/openai.yaml +4 -0
- package/bundled-skills/macos-spm-app-packaging/SKILL.md +105 -0
- package/bundled-skills/macos-spm-app-packaging/agents/openai.yaml +4 -0
- package/bundled-skills/macos-spm-app-packaging/assets/templates/bootstrap/Package.swift +17 -0
- package/bundled-skills/macos-spm-app-packaging/assets/templates/bootstrap/Sources/MyApp/Resources/.keep +0 -0
- package/bundled-skills/macos-spm-app-packaging/assets/templates/bootstrap/Sources/MyApp/main.swift +11 -0
- package/bundled-skills/macos-spm-app-packaging/assets/templates/bootstrap/version.env +2 -0
- package/bundled-skills/macos-spm-app-packaging/assets/templates/build_icon.sh +49 -0
- package/bundled-skills/macos-spm-app-packaging/assets/templates/compile_and_run.sh +63 -0
- package/bundled-skills/macos-spm-app-packaging/assets/templates/launch.sh +28 -0
- package/bundled-skills/macos-spm-app-packaging/assets/templates/make_appcast.sh +82 -0
- package/bundled-skills/macos-spm-app-packaging/assets/templates/package_app.sh +206 -0
- package/bundled-skills/macos-spm-app-packaging/assets/templates/setup_dev_signing.sh +52 -0
- package/bundled-skills/macos-spm-app-packaging/assets/templates/sign-and-notarize.sh +52 -0
- package/bundled-skills/macos-spm-app-packaging/assets/templates/version.env +2 -0
- package/bundled-skills/macos-spm-app-packaging/references/packaging.md +17 -0
- package/bundled-skills/macos-spm-app-packaging/references/release.md +32 -0
- package/bundled-skills/macos-spm-app-packaging/references/scaffold.md +79 -0
- package/bundled-skills/orchestrate-batch-refactor/SKILL.md +97 -0
- package/bundled-skills/orchestrate-batch-refactor/agents/openai.yaml +4 -0
- package/bundled-skills/orchestrate-batch-refactor/references/agent-prompt-templates.md +53 -0
- package/bundled-skills/orchestrate-batch-refactor/references/work-packet-template.md +31 -0
- package/bundled-skills/project-skill-audit/SKILL.md +190 -0
- package/bundled-skills/project-skill-audit/agents/openai.yaml +4 -0
- package/bundled-skills/react-component-performance/SKILL.md +135 -0
- package/bundled-skills/react-component-performance/agents/openai.yaml +4 -0
- package/bundled-skills/react-component-performance/references/examples.md +88 -0
- package/bundled-skills/simplify-code/SKILL.md +179 -0
- package/bundled-skills/snowflake-development/SKILL.md +5 -0
- package/bundled-skills/swift-concurrency-expert/SKILL.md +113 -0
- package/bundled-skills/swift-concurrency-expert/agents/openai.yaml +4 -0
- package/bundled-skills/swift-concurrency-expert/references/approachable-concurrency.md +63 -0
- package/bundled-skills/swift-concurrency-expert/references/swift-6-2-concurrency.md +272 -0
- package/bundled-skills/swift-concurrency-expert/references/swiftui-concurrency-tour-wwdc.md +33 -0
- package/bundled-skills/swiftui-liquid-glass/SKILL.md +98 -0
- package/bundled-skills/swiftui-liquid-glass/agents/openai.yaml +4 -0
- package/bundled-skills/swiftui-liquid-glass/references/liquid-glass.md +280 -0
- package/bundled-skills/swiftui-performance-audit/SKILL.md +114 -0
- package/bundled-skills/swiftui-performance-audit/agents/openai.yaml +4 -0
- package/bundled-skills/swiftui-performance-audit/references/code-smells.md +150 -0
- package/bundled-skills/swiftui-performance-audit/references/demystify-swiftui-performance-wwdc23.md +46 -0
- package/bundled-skills/swiftui-performance-audit/references/optimizing-swiftui-performance-instruments.md +29 -0
- package/bundled-skills/swiftui-performance-audit/references/profiling-intake.md +44 -0
- package/bundled-skills/swiftui-performance-audit/references/report-template.md +47 -0
- package/bundled-skills/swiftui-performance-audit/references/understanding-hangs-in-your-app.md +33 -0
- package/bundled-skills/swiftui-performance-audit/references/understanding-improving-swiftui-performance.md +52 -0
- package/bundled-skills/swiftui-ui-patterns/SKILL.md +103 -0
- package/bundled-skills/swiftui-ui-patterns/agents/openai.yaml +4 -0
- package/bundled-skills/swiftui-ui-patterns/references/app-wiring.md +201 -0
- package/bundled-skills/swiftui-ui-patterns/references/async-state.md +96 -0
- package/bundled-skills/swiftui-ui-patterns/references/components-index.md +50 -0
- package/bundled-skills/swiftui-ui-patterns/references/controls.md +57 -0
- package/bundled-skills/swiftui-ui-patterns/references/deeplinks.md +66 -0
- package/bundled-skills/swiftui-ui-patterns/references/focus.md +90 -0
- package/bundled-skills/swiftui-ui-patterns/references/form.md +97 -0
- package/bundled-skills/swiftui-ui-patterns/references/grids.md +71 -0
- package/bundled-skills/swiftui-ui-patterns/references/haptics.md +71 -0
- package/bundled-skills/swiftui-ui-patterns/references/input-toolbar.md +51 -0
- package/bundled-skills/swiftui-ui-patterns/references/lightweight-clients.md +93 -0
- package/bundled-skills/swiftui-ui-patterns/references/list.md +86 -0
- package/bundled-skills/swiftui-ui-patterns/references/loading-placeholders.md +38 -0
- package/bundled-skills/swiftui-ui-patterns/references/macos-settings.md +71 -0
- package/bundled-skills/swiftui-ui-patterns/references/matched-transitions.md +59 -0
- package/bundled-skills/swiftui-ui-patterns/references/media.md +73 -0
- package/bundled-skills/swiftui-ui-patterns/references/menu-bar.md +101 -0
- package/bundled-skills/swiftui-ui-patterns/references/navigationstack.md +159 -0
- package/bundled-skills/swiftui-ui-patterns/references/overlay.md +45 -0
- package/bundled-skills/swiftui-ui-patterns/references/performance.md +62 -0
- package/bundled-skills/swiftui-ui-patterns/references/previews.md +48 -0
- package/bundled-skills/swiftui-ui-patterns/references/scroll-reveal.md +133 -0
- package/bundled-skills/swiftui-ui-patterns/references/scrollview.md +87 -0
- package/bundled-skills/swiftui-ui-patterns/references/searchable.md +71 -0
- package/bundled-skills/swiftui-ui-patterns/references/sheets.md +155 -0
- package/bundled-skills/swiftui-ui-patterns/references/split-views.md +72 -0
- package/bundled-skills/swiftui-ui-patterns/references/tabview.md +114 -0
- package/bundled-skills/swiftui-ui-patterns/references/theming.md +71 -0
- package/bundled-skills/swiftui-ui-patterns/references/title-menus.md +93 -0
- package/bundled-skills/swiftui-ui-patterns/references/top-bar.md +49 -0
- package/bundled-skills/swiftui-view-refactor/SKILL.md +210 -0
- package/bundled-skills/swiftui-view-refactor/agents/openai.yaml +4 -0
- package/bundled-skills/swiftui-view-refactor/references/mv-patterns.md +161 -0
- package/package.json +1 -1
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
CONF=${1:-release}
|
|
5
|
+
ROOT=$(cd "$(dirname "$0")/.." && pwd)
|
|
6
|
+
cd "$ROOT"
|
|
7
|
+
|
|
8
|
+
APP_NAME=${APP_NAME:-MyApp}
|
|
9
|
+
BUNDLE_ID=${BUNDLE_ID:-com.example.myapp}
|
|
10
|
+
MACOS_MIN_VERSION=${MACOS_MIN_VERSION:-14.0}
|
|
11
|
+
MENU_BAR_APP=${MENU_BAR_APP:-0}
|
|
12
|
+
SIGNING_MODE=${SIGNING_MODE:-}
|
|
13
|
+
APP_IDENTITY=${APP_IDENTITY:-}
|
|
14
|
+
|
|
15
|
+
if [[ -f "$ROOT/version.env" ]]; then
|
|
16
|
+
source "$ROOT/version.env"
|
|
17
|
+
else
|
|
18
|
+
MARKETING_VERSION=${MARKETING_VERSION:-0.1.0}
|
|
19
|
+
BUILD_NUMBER=${BUILD_NUMBER:-1}
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
ARCH_LIST=( ${ARCHES:-} )
|
|
23
|
+
if [[ ${#ARCH_LIST[@]} -eq 0 ]]; then
|
|
24
|
+
HOST_ARCH=$(uname -m)
|
|
25
|
+
ARCH_LIST=("$HOST_ARCH")
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
for ARCH in "${ARCH_LIST[@]}"; do
|
|
29
|
+
swift build -c "$CONF" --arch "$ARCH"
|
|
30
|
+
done
|
|
31
|
+
|
|
32
|
+
APP="$ROOT/${APP_NAME}.app"
|
|
33
|
+
rm -rf "$APP"
|
|
34
|
+
mkdir -p "$APP/Contents/MacOS" "$APP/Contents/Resources" "$APP/Contents/Frameworks"
|
|
35
|
+
|
|
36
|
+
# Convert Icon.icon to Icon.icns if present (requires iconutil).
|
|
37
|
+
ICON_SOURCE="$ROOT/Icon.icon"
|
|
38
|
+
ICON_TARGET="$ROOT/Icon.icns"
|
|
39
|
+
if [[ -f "$ICON_SOURCE" ]]; then
|
|
40
|
+
iconutil --convert icns --output "$ICON_TARGET" "$ICON_SOURCE"
|
|
41
|
+
fi
|
|
42
|
+
|
|
43
|
+
LSUI_VALUE="false"
|
|
44
|
+
if [[ "$MENU_BAR_APP" == "1" ]]; then
|
|
45
|
+
LSUI_VALUE="true"
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
BUILD_TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
|
49
|
+
GIT_COMMIT=$(git rev-parse --short HEAD 2>/dev/null || echo "unknown")
|
|
50
|
+
|
|
51
|
+
cat > "$APP/Contents/Info.plist" <<PLIST
|
|
52
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
53
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
54
|
+
<plist version="1.0">
|
|
55
|
+
<dict>
|
|
56
|
+
<key>CFBundleName</key><string>${APP_NAME}</string>
|
|
57
|
+
<key>CFBundleDisplayName</key><string>${APP_NAME}</string>
|
|
58
|
+
<key>CFBundleIdentifier</key><string>${BUNDLE_ID}</string>
|
|
59
|
+
<key>CFBundleExecutable</key><string>${APP_NAME}</string>
|
|
60
|
+
<key>CFBundlePackageType</key><string>APPL</string>
|
|
61
|
+
<key>CFBundleShortVersionString</key><string>${MARKETING_VERSION}</string>
|
|
62
|
+
<key>CFBundleVersion</key><string>${BUILD_NUMBER}</string>
|
|
63
|
+
<key>LSMinimumSystemVersion</key><string>${MACOS_MIN_VERSION}</string>
|
|
64
|
+
<key>LSUIElement</key><${LSUI_VALUE}/>
|
|
65
|
+
<key>CFBundleIconFile</key><string>Icon</string>
|
|
66
|
+
<key>BuildTimestamp</key><string>${BUILD_TIMESTAMP}</string>
|
|
67
|
+
<key>GitCommit</key><string>${GIT_COMMIT}</string>
|
|
68
|
+
</dict>
|
|
69
|
+
</plist>
|
|
70
|
+
PLIST
|
|
71
|
+
|
|
72
|
+
build_product_path() {
|
|
73
|
+
local name="$1"
|
|
74
|
+
local arch="$2"
|
|
75
|
+
case "$arch" in
|
|
76
|
+
arm64|x86_64) echo ".build/${arch}-apple-macosx/$CONF/$name" ;;
|
|
77
|
+
*) echo ".build/$CONF/$name" ;;
|
|
78
|
+
esac
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
verify_binary_arches() {
|
|
82
|
+
local binary="$1"; shift
|
|
83
|
+
local expected=("$@")
|
|
84
|
+
local actual
|
|
85
|
+
actual=$(lipo -archs "$binary")
|
|
86
|
+
local actual_count expected_count
|
|
87
|
+
actual_count=$(wc -w <<<"$actual" | tr -d ' ')
|
|
88
|
+
expected_count=${#expected[@]}
|
|
89
|
+
if [[ "$actual_count" -ne "$expected_count" ]]; then
|
|
90
|
+
echo "ERROR: $binary arch mismatch (expected: ${expected[*]}, actual: ${actual})" >&2
|
|
91
|
+
exit 1
|
|
92
|
+
fi
|
|
93
|
+
for arch in "${expected[@]}"; do
|
|
94
|
+
if [[ "$actual" != *"$arch"* ]]; then
|
|
95
|
+
echo "ERROR: $binary missing arch $arch (have: ${actual})" >&2
|
|
96
|
+
exit 1
|
|
97
|
+
fi
|
|
98
|
+
done
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
install_binary() {
|
|
102
|
+
local name="$1"
|
|
103
|
+
local dest="$2"
|
|
104
|
+
local binaries=()
|
|
105
|
+
for arch in "${ARCH_LIST[@]}"; do
|
|
106
|
+
local src
|
|
107
|
+
src=$(build_product_path "$name" "$arch")
|
|
108
|
+
if [[ ! -f "$src" ]]; then
|
|
109
|
+
echo "ERROR: Missing ${name} build for ${arch} at ${src}" >&2
|
|
110
|
+
exit 1
|
|
111
|
+
fi
|
|
112
|
+
binaries+=("$src")
|
|
113
|
+
done
|
|
114
|
+
if [[ ${#ARCH_LIST[@]} -gt 1 ]]; then
|
|
115
|
+
lipo -create "${binaries[@]}" -output "$dest"
|
|
116
|
+
else
|
|
117
|
+
cp "${binaries[0]}" "$dest"
|
|
118
|
+
fi
|
|
119
|
+
chmod +x "$dest"
|
|
120
|
+
verify_binary_arches "$dest" "${ARCH_LIST[@]}"
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
install_binary "$APP_NAME" "$APP/Contents/MacOS/$APP_NAME"
|
|
124
|
+
|
|
125
|
+
# Bundle app resources (if any).
|
|
126
|
+
APP_RESOURCES_DIR="$ROOT/Sources/$APP_NAME/Resources"
|
|
127
|
+
if [[ -d "$APP_RESOURCES_DIR" ]]; then
|
|
128
|
+
cp -R "$APP_RESOURCES_DIR/." "$APP/Contents/Resources/"
|
|
129
|
+
fi
|
|
130
|
+
|
|
131
|
+
# SwiftPM resource bundles are emitted next to the built binary.
|
|
132
|
+
PREFERRED_BUILD_DIR="$(dirname "$(build_product_path "$APP_NAME" "${ARCH_LIST[0]}")")"
|
|
133
|
+
shopt -s nullglob
|
|
134
|
+
SWIFTPM_BUNDLES=("${PREFERRED_BUILD_DIR}/"*.bundle)
|
|
135
|
+
shopt -u nullglob
|
|
136
|
+
if [[ ${#SWIFTPM_BUNDLES[@]} -gt 0 ]]; then
|
|
137
|
+
for bundle in "${SWIFTPM_BUNDLES[@]}"; do
|
|
138
|
+
cp -R "$bundle" "$APP/Contents/Resources/"
|
|
139
|
+
done
|
|
140
|
+
fi
|
|
141
|
+
|
|
142
|
+
# Embed frameworks if any exist in the build folder.
|
|
143
|
+
FRAMEWORK_DIRS=(".build/$CONF" ".build/${ARCH_LIST[0]}-apple-macosx/$CONF")
|
|
144
|
+
for dir in "${FRAMEWORK_DIRS[@]}"; do
|
|
145
|
+
if compgen -G "${dir}/*.framework" >/dev/null; then
|
|
146
|
+
cp -R "${dir}/"*.framework "$APP/Contents/Frameworks/"
|
|
147
|
+
chmod -R a+rX "$APP/Contents/Frameworks"
|
|
148
|
+
install_name_tool -add_rpath "@executable_path/../Frameworks" "$APP/Contents/MacOS/$APP_NAME"
|
|
149
|
+
break
|
|
150
|
+
fi
|
|
151
|
+
done
|
|
152
|
+
|
|
153
|
+
if [[ -f "$ICON_TARGET" ]]; then
|
|
154
|
+
cp "$ICON_TARGET" "$APP/Contents/Resources/Icon.icns"
|
|
155
|
+
fi
|
|
156
|
+
|
|
157
|
+
# Ensure contents are writable before stripping attributes and signing.
|
|
158
|
+
chmod -R u+w "$APP"
|
|
159
|
+
|
|
160
|
+
# Strip extended attributes to prevent AppleDouble files that break code sealing.
|
|
161
|
+
xattr -cr "$APP"
|
|
162
|
+
find "$APP" -name '._*' -delete
|
|
163
|
+
|
|
164
|
+
ENTITLEMENTS_DIR="$ROOT/.build/entitlements"
|
|
165
|
+
DEFAULT_ENTITLEMENTS="$ENTITLEMENTS_DIR/${APP_NAME}.entitlements"
|
|
166
|
+
mkdir -p "$ENTITLEMENTS_DIR"
|
|
167
|
+
|
|
168
|
+
APP_ENTITLEMENTS=${APP_ENTITLEMENTS:-$DEFAULT_ENTITLEMENTS}
|
|
169
|
+
if [[ ! -f "$APP_ENTITLEMENTS" ]]; then
|
|
170
|
+
cat > "$APP_ENTITLEMENTS" <<PLIST
|
|
171
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
172
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
173
|
+
<plist version="1.0">
|
|
174
|
+
<dict>
|
|
175
|
+
<!-- Add entitlements here if needed. -->
|
|
176
|
+
</dict>
|
|
177
|
+
</plist>
|
|
178
|
+
PLIST
|
|
179
|
+
fi
|
|
180
|
+
|
|
181
|
+
if [[ "$SIGNING_MODE" == "adhoc" || -z "$APP_IDENTITY" ]]; then
|
|
182
|
+
CODESIGN_ARGS=(--force --sign "-")
|
|
183
|
+
else
|
|
184
|
+
CODESIGN_ARGS=(--force --timestamp --options runtime --sign "$APP_IDENTITY")
|
|
185
|
+
fi
|
|
186
|
+
|
|
187
|
+
# Sign embedded frameworks and their nested binaries before the app bundle.
|
|
188
|
+
sign_frameworks() {
|
|
189
|
+
local fw
|
|
190
|
+
for fw in "$APP/Contents/Frameworks/"*.framework; do
|
|
191
|
+
if [[ ! -d "$fw" ]]; then
|
|
192
|
+
continue
|
|
193
|
+
fi
|
|
194
|
+
while IFS= read -r -d '' bin; do
|
|
195
|
+
codesign "${CODESIGN_ARGS[@]}" "$bin"
|
|
196
|
+
done < <(find "$fw" -type f -perm -111 -print0)
|
|
197
|
+
codesign "${CODESIGN_ARGS[@]}" "$fw"
|
|
198
|
+
done
|
|
199
|
+
}
|
|
200
|
+
sign_frameworks
|
|
201
|
+
|
|
202
|
+
codesign "${CODESIGN_ARGS[@]}" \
|
|
203
|
+
--entitlements "$APP_ENTITLEMENTS" \
|
|
204
|
+
"$APP"
|
|
205
|
+
|
|
206
|
+
echo "Created $APP"
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Setup stable development code signing to reduce keychain prompts.
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
|
|
5
|
+
APP_NAME=${APP_NAME:-MyApp}
|
|
6
|
+
CERT_NAME="${APP_NAME} Development"
|
|
7
|
+
|
|
8
|
+
if security find-certificate -c "$CERT_NAME" >/dev/null 2>&1; then
|
|
9
|
+
echo "Certificate '$CERT_NAME' already exists."
|
|
10
|
+
echo "Export this in your shell profile:"
|
|
11
|
+
echo " export APP_IDENTITY='$CERT_NAME'"
|
|
12
|
+
exit 0
|
|
13
|
+
fi
|
|
14
|
+
|
|
15
|
+
echo "Creating self-signed certificate '$CERT_NAME'..."
|
|
16
|
+
|
|
17
|
+
TEMP_CONFIG=$(mktemp)
|
|
18
|
+
trap "rm -f $TEMP_CONFIG" EXIT
|
|
19
|
+
|
|
20
|
+
cat > "$TEMP_CONFIG" <<EOFCONF
|
|
21
|
+
[ req ]
|
|
22
|
+
distinguished_name = req_distinguished_name
|
|
23
|
+
x509_extensions = v3_req
|
|
24
|
+
prompt = no
|
|
25
|
+
|
|
26
|
+
[ req_distinguished_name ]
|
|
27
|
+
CN = $CERT_NAME
|
|
28
|
+
O = ${APP_NAME} Development
|
|
29
|
+
C = US
|
|
30
|
+
|
|
31
|
+
[ v3_req ]
|
|
32
|
+
keyUsage = critical,digitalSignature
|
|
33
|
+
extendedKeyUsage = codeSigning
|
|
34
|
+
EOFCONF
|
|
35
|
+
|
|
36
|
+
openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 \
|
|
37
|
+
-nodes -keyout /tmp/dev.key -out /tmp/dev.crt \
|
|
38
|
+
-config "$TEMP_CONFIG" 2>/dev/null
|
|
39
|
+
|
|
40
|
+
openssl pkcs12 -export -out /tmp/dev.p12 \
|
|
41
|
+
-inkey /tmp/dev.key -in /tmp/dev.crt \
|
|
42
|
+
-passout pass: 2>/dev/null
|
|
43
|
+
|
|
44
|
+
security import /tmp/dev.p12 -k ~/Library/Keychains/login.keychain-db \
|
|
45
|
+
-T /usr/bin/codesign -T /usr/bin/security
|
|
46
|
+
|
|
47
|
+
rm -f /tmp/dev.{key,crt,p12}
|
|
48
|
+
|
|
49
|
+
echo ""
|
|
50
|
+
echo "Trust this certificate for code signing in Keychain Access."
|
|
51
|
+
echo "Then export in your shell profile:"
|
|
52
|
+
echo " export APP_IDENTITY='$CERT_NAME'"
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
APP_NAME=${APP_NAME:-MyApp}
|
|
5
|
+
APP_IDENTITY=${APP_IDENTITY:-"Developer ID Application: Example (TEAMID)"}
|
|
6
|
+
APP_BUNDLE="${APP_NAME}.app"
|
|
7
|
+
ROOT=$(cd "$(dirname "$0")/.." && pwd)
|
|
8
|
+
source "$ROOT/version.env"
|
|
9
|
+
ZIP_NAME="${APP_NAME}-${MARKETING_VERSION}.zip"
|
|
10
|
+
|
|
11
|
+
if [[ -z "${APP_STORE_CONNECT_API_KEY_P8:-}" || -z "${APP_STORE_CONNECT_KEY_ID:-}" || -z "${APP_STORE_CONNECT_ISSUER_ID:-}" ]]; then
|
|
12
|
+
echo "Missing APP_STORE_CONNECT_* env vars (API key, key id, issuer id)." >&2
|
|
13
|
+
exit 1
|
|
14
|
+
fi
|
|
15
|
+
|
|
16
|
+
echo "$APP_STORE_CONNECT_API_KEY_P8" | sed 's/\\n/\n/g' > /tmp/app-store-connect-key.p8
|
|
17
|
+
trap 'rm -f /tmp/app-store-connect-key.p8 /tmp/${APP_NAME}Notarize.zip' EXIT
|
|
18
|
+
|
|
19
|
+
ARCHES_VALUE=${ARCHES:-"arm64 x86_64"}
|
|
20
|
+
ARCH_LIST=( ${ARCHES_VALUE} )
|
|
21
|
+
for ARCH in "${ARCH_LIST[@]}"; do
|
|
22
|
+
swift build -c release --arch "$ARCH"
|
|
23
|
+
done
|
|
24
|
+
ARCHES="${ARCHES_VALUE}" "$ROOT/Scripts/package_app.sh" release
|
|
25
|
+
|
|
26
|
+
ENTITLEMENTS_DIR="$ROOT/.build/entitlements"
|
|
27
|
+
APP_ENTITLEMENTS="${APP_ENTITLEMENTS:-${ENTITLEMENTS_DIR}/${APP_NAME}.entitlements}"
|
|
28
|
+
|
|
29
|
+
codesign --force --timestamp --options runtime --sign "$APP_IDENTITY" \
|
|
30
|
+
--entitlements "$APP_ENTITLEMENTS" \
|
|
31
|
+
"$APP_BUNDLE"
|
|
32
|
+
|
|
33
|
+
DITTO_BIN=${DITTO_BIN:-/usr/bin/ditto}
|
|
34
|
+
"$DITTO_BIN" --norsrc -c -k --keepParent "$APP_BUNDLE" "/tmp/${APP_NAME}Notarize.zip"
|
|
35
|
+
|
|
36
|
+
xcrun notarytool submit "/tmp/${APP_NAME}Notarize.zip" \
|
|
37
|
+
--key /tmp/app-store-connect-key.p8 \
|
|
38
|
+
--key-id "$APP_STORE_CONNECT_KEY_ID" \
|
|
39
|
+
--issuer "$APP_STORE_CONNECT_ISSUER_ID" \
|
|
40
|
+
--wait
|
|
41
|
+
|
|
42
|
+
xcrun stapler staple "$APP_BUNDLE"
|
|
43
|
+
|
|
44
|
+
xattr -cr "$APP_BUNDLE"
|
|
45
|
+
find "$APP_BUNDLE" -name '._*' -delete
|
|
46
|
+
|
|
47
|
+
"$DITTO_BIN" --norsrc -c -k --keepParent "$APP_BUNDLE" "$ZIP_NAME"
|
|
48
|
+
|
|
49
|
+
spctl -a -t exec -vv "$APP_BUNDLE"
|
|
50
|
+
stapler validate "$APP_BUNDLE"
|
|
51
|
+
|
|
52
|
+
echo "Done: $ZIP_NAME"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Packaging notes
|
|
2
|
+
|
|
3
|
+
## Build output paths
|
|
4
|
+
SwiftPM places binaries under:
|
|
5
|
+
- `.build/<arch>-apple-macosx/<config>/<AppName>` for arch-specific builds
|
|
6
|
+
- `.build/<config>/<AppName>` for some products (frameworks/tools)
|
|
7
|
+
|
|
8
|
+
Use `ARCHES="arm64 x86_64"` with `swift build` to produce universal binaries.
|
|
9
|
+
|
|
10
|
+
## Common environment variables (used by templates)
|
|
11
|
+
- `APP_NAME`: App/binary name (for example, `MyApp`).
|
|
12
|
+
- `BUNDLE_ID`: Bundle identifier (for example, `com.example.myapp`).
|
|
13
|
+
- `ARCHES`: Space-separated architectures (default: host arch).
|
|
14
|
+
- `SIGNING_MODE`: `adhoc` to avoid keychain prompts in dev.
|
|
15
|
+
- `APP_IDENTITY`: Codesigning identity name for release builds.
|
|
16
|
+
- `MACOS_MIN_VERSION`: Minimum macOS version for Info.plist.
|
|
17
|
+
- `MENU_BAR_APP`: Set to `1` to add `LSUIElement` to Info.plist.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Release and notarization notes
|
|
2
|
+
|
|
3
|
+
## Notarization requirements
|
|
4
|
+
- Install Xcode Command Line Tools (for `xcrun` and `notarytool`).
|
|
5
|
+
- Provide App Store Connect API credentials:
|
|
6
|
+
- `APP_STORE_CONNECT_API_KEY_P8`
|
|
7
|
+
- `APP_STORE_CONNECT_KEY_ID`
|
|
8
|
+
- `APP_STORE_CONNECT_ISSUER_ID`
|
|
9
|
+
- Provide a Developer ID Application identity in `APP_IDENTITY`.
|
|
10
|
+
|
|
11
|
+
## Sparkle appcast (optional)
|
|
12
|
+
- Install Sparkle tools so `generate_appcast` is on PATH.
|
|
13
|
+
- Provide `SPARKLE_PRIVATE_KEY_FILE` (ed25519 key).
|
|
14
|
+
- The appcast script uses your zip artifact to create an updated `appcast.xml`.
|
|
15
|
+
- Sparkle compares `sparkle:version` (derived from `CFBundleVersion`), so bump `BUILD_NUMBER` for every release.
|
|
16
|
+
|
|
17
|
+
## Tag and GitHub release (optional)
|
|
18
|
+
Use a versioned git tag and publish a GitHub release with the notarized zip (and appcast if you host it on GitHub Releases).
|
|
19
|
+
|
|
20
|
+
Example flow:
|
|
21
|
+
```
|
|
22
|
+
git tag v<version>
|
|
23
|
+
git push origin v<version>
|
|
24
|
+
|
|
25
|
+
gh release create v<version> CodexBar-<version>.zip appcast.xml \
|
|
26
|
+
--title "AppName <version>" \
|
|
27
|
+
--notes-file CHANGELOG.md
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Notes:
|
|
31
|
+
- If you serve appcast from GitHub Releases or raw URLs, ensure the release is published and assets are accessible (no 404s).
|
|
32
|
+
- Prefer using a curated release notes file rather than dumping the full changelog.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Scaffold a SwiftPM macOS app (no Xcode)
|
|
2
|
+
|
|
3
|
+
## Steps
|
|
4
|
+
1) Create a repo and initialize SwiftPM:
|
|
5
|
+
```
|
|
6
|
+
mkdir MyApp
|
|
7
|
+
cd MyApp
|
|
8
|
+
swift package init --type executable
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
2) Update `Package.swift` to target macOS and define an executable target for the app.
|
|
12
|
+
|
|
13
|
+
3) Create the app entry point under `Sources/MyApp/`.
|
|
14
|
+
- Use SwiftUI if you want a windowed app with minimal AppKit glue.
|
|
15
|
+
- Use AppKit if you want a menu bar or accessory-style app.
|
|
16
|
+
|
|
17
|
+
4) If you need app resources, add:
|
|
18
|
+
```
|
|
19
|
+
resources: [.process("Resources")]
|
|
20
|
+
```
|
|
21
|
+
and create `Sources/MyApp/Resources/`.
|
|
22
|
+
|
|
23
|
+
5) Add a `version.env` file (used by packaging templates):
|
|
24
|
+
```
|
|
25
|
+
MARKETING_VERSION=0.1.0
|
|
26
|
+
BUILD_NUMBER=1
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
6) Copy script templates from `assets/templates/` into your repo (for example, `Scripts/`).
|
|
30
|
+
|
|
31
|
+
## Minimal Package.swift (example)
|
|
32
|
+
```
|
|
33
|
+
// swift-tools-version: 6.2
|
|
34
|
+
import PackageDescription
|
|
35
|
+
|
|
36
|
+
let package = Package(
|
|
37
|
+
name: "MyApp",
|
|
38
|
+
platforms: [.macOS(.v14)],
|
|
39
|
+
targets: [
|
|
40
|
+
.executableTarget(
|
|
41
|
+
name: "MyApp",
|
|
42
|
+
path: "Sources/MyApp",
|
|
43
|
+
resources: [
|
|
44
|
+
.process("Resources")
|
|
45
|
+
])
|
|
46
|
+
]
|
|
47
|
+
)
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Minimal SwiftUI entry point (example)
|
|
51
|
+
```
|
|
52
|
+
import SwiftUI
|
|
53
|
+
|
|
54
|
+
@main
|
|
55
|
+
struct MyApp: App {
|
|
56
|
+
var body: some Scene {
|
|
57
|
+
WindowGroup {
|
|
58
|
+
Text("Hello")
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Minimal AppKit entry point (example)
|
|
65
|
+
```
|
|
66
|
+
import AppKit
|
|
67
|
+
|
|
68
|
+
final class AppDelegate: NSObject, NSApplicationDelegate {
|
|
69
|
+
func applicationDidFinishLaunching(_ notification: Notification) {
|
|
70
|
+
// Initialize app state here.
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
let app = NSApplication.shared
|
|
75
|
+
let delegate = AppDelegate()
|
|
76
|
+
app.delegate = delegate
|
|
77
|
+
app.setActivationPolicy(.regular)
|
|
78
|
+
app.run()
|
|
79
|
+
```
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "orchestrate-batch-refactor"
|
|
3
|
+
description: "Plan and execute large refactors with dependency-aware work packets and parallel analysis."
|
|
4
|
+
risk: safe
|
|
5
|
+
source: "Dimillian/Skills (MIT)"
|
|
6
|
+
date_added: "2026-03-25"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Orchestrate Batch Refactor
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
Use this skill to run high-throughput refactors safely.
|
|
14
|
+
Analyze scope in parallel, synthesize a single plan, then execute independent work packets with sub-agents.
|
|
15
|
+
|
|
16
|
+
## When to Use
|
|
17
|
+
|
|
18
|
+
- When a refactor spans many files or subsystems and needs clear work partitioning.
|
|
19
|
+
- When you need dependency-aware planning before parallel implementation.
|
|
20
|
+
|
|
21
|
+
## Inputs
|
|
22
|
+
|
|
23
|
+
- Repo path and target scope (paths, modules, or feature area)
|
|
24
|
+
- Goal type: refactor, rewrite, or hybrid
|
|
25
|
+
- Constraints: behavior parity, API stability, deadlines, test requirements
|
|
26
|
+
|
|
27
|
+
## When to Use Parallelization
|
|
28
|
+
|
|
29
|
+
- Use this skill for medium/large scope touching many files or subsystems.
|
|
30
|
+
- Skip multi-agent execution for tiny edits or highly coupled single-file work.
|
|
31
|
+
|
|
32
|
+
## Core Workflow
|
|
33
|
+
|
|
34
|
+
1. Define scope and success criteria.
|
|
35
|
+
- List target paths/modules and non-goals.
|
|
36
|
+
- State behavior constraints (for example: preserve external behavior).
|
|
37
|
+
2. Run parallel analysis first.
|
|
38
|
+
- Split target scope into analysis lanes.
|
|
39
|
+
- Spawn `explorer` sub-agents in parallel to analyze each lane.
|
|
40
|
+
- Ask each agent for: intent map, coupling risks, candidate work packets, required validations.
|
|
41
|
+
3. Build one dependency-aware plan.
|
|
42
|
+
- Merge explorer output into a single work graph.
|
|
43
|
+
- Create work packets with clear file ownership and validation commands.
|
|
44
|
+
- Sequence packets by dependency level; run only independent packets in parallel.
|
|
45
|
+
4. Execute with worker agents.
|
|
46
|
+
- Spawn one `worker` per independent packet.
|
|
47
|
+
- Assign explicit ownership (files/responsibility).
|
|
48
|
+
- Instruct every worker that they are not alone in the codebase and must ignore unrelated edits.
|
|
49
|
+
5. Integrate and verify.
|
|
50
|
+
- Review packet outputs, resolve overlaps, and run validation gates.
|
|
51
|
+
- Run targeted tests per packet, then broader suite for integrated scope.
|
|
52
|
+
6. Report and close.
|
|
53
|
+
- Summarize packet outcomes, key refactors, conflicts resolved, and residual risks.
|
|
54
|
+
|
|
55
|
+
## Work Packet Rules
|
|
56
|
+
|
|
57
|
+
- One owner per file per execution wave.
|
|
58
|
+
- No parallel edits on overlapping file sets.
|
|
59
|
+
- Keep packet goals narrow and measurable.
|
|
60
|
+
- Include explicit done criteria and required checks.
|
|
61
|
+
- Prefer behavior-preserving refactors unless user explicitly requests behavior change.
|
|
62
|
+
|
|
63
|
+
## Planning Contract
|
|
64
|
+
|
|
65
|
+
Every packet must include:
|
|
66
|
+
|
|
67
|
+
1. Packet ID and objective.
|
|
68
|
+
2. Owned files.
|
|
69
|
+
3. Dependencies (none or packet IDs).
|
|
70
|
+
4. Risks and invariants to preserve.
|
|
71
|
+
5. Required checks.
|
|
72
|
+
6. Integration notes for main thread.
|
|
73
|
+
|
|
74
|
+
Use [`references/work-packet-template.md`](references/work-packet-template.md) for the exact shape.
|
|
75
|
+
|
|
76
|
+
## Agent Prompting Contract
|
|
77
|
+
|
|
78
|
+
- Use the prompt templates in [`references/agent-prompt-templates.md`](references/agent-prompt-templates.md).
|
|
79
|
+
- Explorer prompts focus on analysis and decomposition.
|
|
80
|
+
- Worker prompts focus on implementation and validation with strict ownership boundaries.
|
|
81
|
+
|
|
82
|
+
## Safety Guardrails
|
|
83
|
+
|
|
84
|
+
- Do not start worker execution before plan synthesis is complete.
|
|
85
|
+
- Do not parallelize across unresolved dependencies.
|
|
86
|
+
- Do not claim completion if any required packet check fails.
|
|
87
|
+
- Stop and re-plan when packet boundaries cause repeated merge conflicts.
|
|
88
|
+
|
|
89
|
+
## Validation Strategy
|
|
90
|
+
|
|
91
|
+
Run in this order:
|
|
92
|
+
|
|
93
|
+
1. Packet-level checks (fast and scoped).
|
|
94
|
+
2. Cross-packet integration checks.
|
|
95
|
+
3. Full project safety checks when scope is broad.
|
|
96
|
+
|
|
97
|
+
Prefer fast feedback loops, but never skip required behavior checks.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Agent Prompt Templates
|
|
2
|
+
|
|
3
|
+
Use these templates when spawning sub-agents.
|
|
4
|
+
|
|
5
|
+
## Explorer Prompt Template
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
Analyze the target scope and return decomposition guidance only.
|
|
9
|
+
|
|
10
|
+
Scope:
|
|
11
|
+
- Paths/modules: <fill>
|
|
12
|
+
- Goal: <refactor|rewrite|hybrid>
|
|
13
|
+
- Constraints: <behavior/API/test constraints>
|
|
14
|
+
|
|
15
|
+
Return:
|
|
16
|
+
1. Intent map (what each area currently does)
|
|
17
|
+
2. Coupling and dependency risks
|
|
18
|
+
3. Candidate work packets with non-overlapping ownership
|
|
19
|
+
4. Validation commands per packet
|
|
20
|
+
5. Recommended execution order
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Worker Prompt Template
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
You own this packet and are not alone in the codebase.
|
|
27
|
+
Ignore unrelated edits by others and do not touch files outside ownership.
|
|
28
|
+
|
|
29
|
+
Packet:
|
|
30
|
+
- ID: <fill>
|
|
31
|
+
- Objective: <fill>
|
|
32
|
+
- Owned files: <fill>
|
|
33
|
+
- Dependencies already completed: <fill>
|
|
34
|
+
- Invariants to preserve: <fill>
|
|
35
|
+
- Required checks: <fill>
|
|
36
|
+
|
|
37
|
+
Execution requirements:
|
|
38
|
+
1. Implement only the packet objective.
|
|
39
|
+
2. Preserve specified invariants and external behavior.
|
|
40
|
+
3. Run required checks and report exact results.
|
|
41
|
+
4. Summarize changed files and any integration notes.
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Main Thread Synthesis Prompt Template
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
Merge explorer outputs into a single dependency-aware plan.
|
|
48
|
+
Produce:
|
|
49
|
+
1. Packet table with ownership and dependencies
|
|
50
|
+
2. Parallel execution waves (no overlap per wave)
|
|
51
|
+
3. Validation matrix by packet and integration stage
|
|
52
|
+
4. Risk list with mitigation actions
|
|
53
|
+
```
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Work Packet Template
|
|
2
|
+
|
|
3
|
+
Use this template to define each packet before spawning workers.
|
|
4
|
+
|
|
5
|
+
## Packet
|
|
6
|
+
|
|
7
|
+
- `id`:
|
|
8
|
+
- `objective`:
|
|
9
|
+
- `mode`: `refactor` | `rewrite` | `hybrid`
|
|
10
|
+
- `owner_agent_type`: `worker`
|
|
11
|
+
- `owned_files`:
|
|
12
|
+
- `dependencies`:
|
|
13
|
+
- `invariants_to_preserve`:
|
|
14
|
+
- `out_of_scope`:
|
|
15
|
+
- `required_checks`:
|
|
16
|
+
- `integration_notes`:
|
|
17
|
+
- `done_criteria`:
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
- `id`: `P3`
|
|
22
|
+
- `objective`: "Extract duplicated parsing logic from thread reducers into shared helper"
|
|
23
|
+
- `mode`: `refactor`
|
|
24
|
+
- `owner_agent_type`: `worker`
|
|
25
|
+
- `owned_files`: `src/features/threads/hooks/threadReducer/*.ts`
|
|
26
|
+
- `dependencies`: `P1`
|
|
27
|
+
- `invariants_to_preserve`: "Thread ordering and hidden-thread filtering behavior"
|
|
28
|
+
- `out_of_scope`: "UI rendering components"
|
|
29
|
+
- `required_checks`: `npm run typecheck`, `npm run test -- src/features/threads/hooks`
|
|
30
|
+
- `integration_notes`: "Main thread verifies no overlapping helper names with existing util package"
|
|
31
|
+
- `done_criteria`: "No duplicated parsing block remains; all required checks pass"
|