create-egregore 0.20.0 → 0.20.2

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.
Files changed (160) hide show
  1. package/assets/egregore-launcher.js +80 -15
  2. package/lib/local.js +4 -20
  3. package/lib/setup.js +21 -4
  4. package/package.json +2 -2
  5. package/runtime/codex/.codex/config.toml +3 -0
  6. package/runtime/codex/.codex/skills/archive/SKILL.md +1 -1
  7. package/runtime/codex/.codex/skills/branch/SKILL.md +1 -1
  8. package/runtime/codex/.codex/skills/checkup/SKILL.md +1 -1
  9. package/runtime/codex/.codex/skills/commit/SKILL.md +1 -1
  10. package/runtime/codex/.codex/skills/contribute/SKILL.md +1 -1
  11. package/runtime/codex/.codex/skills/delete-user/SKILL.md +1 -1
  12. package/runtime/codex/.codex/skills/ingest/SKILL.md +1 -1
  13. package/runtime/codex/.codex/skills/ingest-corpus/SKILL.md +29 -0
  14. package/runtime/codex/.codex/skills/ingest-notion/SKILL.md +1 -1
  15. package/runtime/codex/.codex/skills/ingest-user-interview/SKILL.md +1 -1
  16. package/runtime/codex/.codex/skills/issue/SKILL.md +1 -1
  17. package/runtime/codex/.codex/skills/me/SKILL.md +1 -1
  18. package/runtime/codex/.codex/skills/meeting/SKILL.md +1 -1
  19. package/runtime/codex/.codex/skills/note/SKILL.md +1 -1
  20. package/runtime/codex/.codex/skills/notion-connect/SKILL.md +1 -1
  21. package/runtime/codex/.codex/skills/onboarding/SKILL.md +1 -1
  22. package/runtime/codex/.codex/skills/pr/SKILL.md +1 -1
  23. package/runtime/codex/.codex/skills/pull/SKILL.md +1 -1
  24. package/runtime/codex/.codex/skills/push/SKILL.md +1 -1
  25. package/runtime/codex/.codex/skills/reflect/SKILL.md +1 -1
  26. package/runtime/codex/.codex/skills/review-pr/SKILL.md +1 -1
  27. package/runtime/codex/.codex/skills/save/SKILL.md +3 -1
  28. package/runtime/codex/.codex/skills/slack-connect/SKILL.md +1 -1
  29. package/runtime/codex/.codex/skills/summon/SKILL.md +1 -1
  30. package/runtime/codex/.codex/skills/sync-repos/SKILL.md +1 -1
  31. package/runtime/codex/.codex/skills/teams-connect/SKILL.md +1 -1
  32. package/runtime/codex/.codex/skills/telegram-connect/SKILL.md +1 -1
  33. package/runtime/codex/.codex/skills/telemetry/SKILL.md +1 -1
  34. package/runtime/codex/.codex/skills/test/SKILL.md +1 -1
  35. package/runtime/codex/.codex/skills/tutorial/SKILL.md +1 -1
  36. package/runtime/codex/.codex/skills/update/SKILL.md +1 -1
  37. package/runtime/codex/.codex/spec-manifest.json +4 -4
  38. package/runtime/codex/AGENTS.md +52 -39
  39. package/runtime/codex/bin/agent.sh +32 -8
  40. package/runtime/codex/bin/codex-render-spec.mjs +31 -34
  41. package/runtime/codex/bin/codex-sync-skills.sh +6 -1
  42. package/runtime/codex/bin/contribute-guard.sh +79 -0
  43. package/runtime/codex/bin/handoff-pr-backfill.sh +1 -1
  44. package/runtime/codex/bin/handoff-run.sh +8 -3
  45. package/runtime/codex/bin/handoff-save-egregore.sh +20 -8
  46. package/runtime/codex/bin/ingest.py +260 -5
  47. package/runtime/codex/bin/lib/git-message.sh +37 -0
  48. package/runtime/codex/bin/lib/git-sync.sh +26 -2
  49. package/runtime/codex/bin/lib/greeting.sh +2 -2
  50. package/runtime/codex/bin/search.sh +46 -4
  51. package/runtime/codex/bin/session-autosave.sh +13 -2
  52. package/runtime/codex/bin/settings.sh +63 -4
  53. package/runtime/codex/bin/worktree-create.sh +4 -1
  54. package/runtime/codex/manifest.json +5 -1
  55. package/runtime/pi/.codex/config.toml +3 -0
  56. package/runtime/pi/.codex/skills/archive/SKILL.md +1 -1
  57. package/runtime/pi/.codex/skills/branch/SKILL.md +1 -1
  58. package/runtime/pi/.codex/skills/checkup/SKILL.md +1 -1
  59. package/runtime/pi/.codex/skills/commit/SKILL.md +1 -1
  60. package/runtime/pi/.codex/skills/contribute/SKILL.md +1 -1
  61. package/runtime/pi/.codex/skills/delete-user/SKILL.md +1 -1
  62. package/runtime/pi/.codex/skills/ingest/SKILL.md +1 -1
  63. package/runtime/pi/.codex/skills/ingest-corpus/SKILL.md +29 -0
  64. package/runtime/pi/.codex/skills/ingest-notion/SKILL.md +1 -1
  65. package/runtime/pi/.codex/skills/ingest-user-interview/SKILL.md +1 -1
  66. package/runtime/pi/.codex/skills/issue/SKILL.md +1 -1
  67. package/runtime/pi/.codex/skills/me/SKILL.md +1 -1
  68. package/runtime/pi/.codex/skills/meeting/SKILL.md +1 -1
  69. package/runtime/pi/.codex/skills/note/SKILL.md +1 -1
  70. package/runtime/pi/.codex/skills/notion-connect/SKILL.md +1 -1
  71. package/runtime/pi/.codex/skills/onboarding/SKILL.md +1 -1
  72. package/runtime/pi/.codex/skills/pr/SKILL.md +1 -1
  73. package/runtime/pi/.codex/skills/pull/SKILL.md +1 -1
  74. package/runtime/pi/.codex/skills/push/SKILL.md +1 -1
  75. package/runtime/pi/.codex/skills/reflect/SKILL.md +1 -1
  76. package/runtime/pi/.codex/skills/review-pr/SKILL.md +1 -1
  77. package/runtime/pi/.codex/skills/save/SKILL.md +3 -1
  78. package/runtime/pi/.codex/skills/slack-connect/SKILL.md +1 -1
  79. package/runtime/pi/.codex/skills/summon/SKILL.md +1 -1
  80. package/runtime/pi/.codex/skills/sync-repos/SKILL.md +1 -1
  81. package/runtime/pi/.codex/skills/teams-connect/SKILL.md +1 -1
  82. package/runtime/pi/.codex/skills/telegram-connect/SKILL.md +1 -1
  83. package/runtime/pi/.codex/skills/telemetry/SKILL.md +1 -1
  84. package/runtime/pi/.codex/skills/test/SKILL.md +1 -1
  85. package/runtime/pi/.codex/skills/tutorial/SKILL.md +1 -1
  86. package/runtime/pi/.codex/skills/update/SKILL.md +1 -1
  87. package/runtime/pi/.codex/spec-manifest.json +4 -4
  88. package/runtime/pi/.pi/APPEND_SYSTEM.md +76 -39
  89. package/runtime/pi/.pi/spec-manifest.json +2 -2
  90. package/runtime/pi/AGENTS.md +52 -39
  91. package/runtime/pi/bin/agent.sh +32 -8
  92. package/runtime/pi/bin/codex-render-spec.mjs +31 -34
  93. package/runtime/pi/bin/codex-sync-skills.sh +6 -1
  94. package/runtime/pi/bin/contribute-guard.sh +79 -0
  95. package/runtime/pi/bin/handoff-pr-backfill.sh +1 -1
  96. package/runtime/pi/bin/handoff-run.sh +8 -3
  97. package/runtime/pi/bin/handoff-save-egregore.sh +20 -8
  98. package/runtime/pi/bin/ingest.py +260 -5
  99. package/runtime/pi/bin/lib/git-message.sh +37 -0
  100. package/runtime/pi/bin/lib/git-sync.sh +26 -2
  101. package/runtime/pi/bin/lib/greeting.sh +2 -2
  102. package/runtime/pi/bin/pi-render-spec.mjs +52 -26
  103. package/runtime/pi/bin/search.sh +46 -4
  104. package/runtime/pi/bin/session-autosave.sh +13 -2
  105. package/runtime/pi/bin/settings.sh +63 -4
  106. package/runtime/pi/bin/worktree-create.sh +4 -1
  107. package/runtime/pi/manifest.json +5 -1
  108. package/runtime/prime/.codex/config.toml +3 -0
  109. package/runtime/prime/.codex/skills/archive/SKILL.md +1 -1
  110. package/runtime/prime/.codex/skills/branch/SKILL.md +1 -1
  111. package/runtime/prime/.codex/skills/checkup/SKILL.md +1 -1
  112. package/runtime/prime/.codex/skills/commit/SKILL.md +1 -1
  113. package/runtime/prime/.codex/skills/contribute/SKILL.md +1 -1
  114. package/runtime/prime/.codex/skills/delete-user/SKILL.md +1 -1
  115. package/runtime/prime/.codex/skills/ingest/SKILL.md +1 -1
  116. package/runtime/prime/.codex/skills/ingest-corpus/SKILL.md +29 -0
  117. package/runtime/prime/.codex/skills/ingest-notion/SKILL.md +1 -1
  118. package/runtime/prime/.codex/skills/ingest-user-interview/SKILL.md +1 -1
  119. package/runtime/prime/.codex/skills/issue/SKILL.md +1 -1
  120. package/runtime/prime/.codex/skills/me/SKILL.md +1 -1
  121. package/runtime/prime/.codex/skills/meeting/SKILL.md +1 -1
  122. package/runtime/prime/.codex/skills/note/SKILL.md +1 -1
  123. package/runtime/prime/.codex/skills/notion-connect/SKILL.md +1 -1
  124. package/runtime/prime/.codex/skills/onboarding/SKILL.md +1 -1
  125. package/runtime/prime/.codex/skills/pr/SKILL.md +1 -1
  126. package/runtime/prime/.codex/skills/pull/SKILL.md +1 -1
  127. package/runtime/prime/.codex/skills/push/SKILL.md +1 -1
  128. package/runtime/prime/.codex/skills/reflect/SKILL.md +1 -1
  129. package/runtime/prime/.codex/skills/review-pr/SKILL.md +1 -1
  130. package/runtime/prime/.codex/skills/save/SKILL.md +3 -1
  131. package/runtime/prime/.codex/skills/slack-connect/SKILL.md +1 -1
  132. package/runtime/prime/.codex/skills/summon/SKILL.md +1 -1
  133. package/runtime/prime/.codex/skills/sync-repos/SKILL.md +1 -1
  134. package/runtime/prime/.codex/skills/teams-connect/SKILL.md +1 -1
  135. package/runtime/prime/.codex/skills/telegram-connect/SKILL.md +1 -1
  136. package/runtime/prime/.codex/skills/telemetry/SKILL.md +1 -1
  137. package/runtime/prime/.codex/skills/test/SKILL.md +1 -1
  138. package/runtime/prime/.codex/skills/tutorial/SKILL.md +1 -1
  139. package/runtime/prime/.codex/skills/update/SKILL.md +1 -1
  140. package/runtime/prime/.codex/spec-manifest.json +4 -4
  141. package/runtime/prime/.prime/agent/APPEND_SYSTEM.md +77 -40
  142. package/runtime/prime/.prime/agent/spec-manifest.json +2 -2
  143. package/runtime/prime/AGENTS.md +52 -39
  144. package/runtime/prime/bin/agent.sh +32 -8
  145. package/runtime/prime/bin/codex-render-spec.mjs +31 -34
  146. package/runtime/prime/bin/codex-sync-skills.sh +6 -1
  147. package/runtime/prime/bin/contribute-guard.sh +79 -0
  148. package/runtime/prime/bin/handoff-pr-backfill.sh +1 -1
  149. package/runtime/prime/bin/handoff-run.sh +8 -3
  150. package/runtime/prime/bin/handoff-save-egregore.sh +20 -8
  151. package/runtime/prime/bin/ingest.py +260 -5
  152. package/runtime/prime/bin/lib/git-message.sh +37 -0
  153. package/runtime/prime/bin/lib/git-sync.sh +26 -2
  154. package/runtime/prime/bin/lib/greeting.sh +2 -2
  155. package/runtime/prime/bin/prime-render-spec.mjs +52 -28
  156. package/runtime/prime/bin/search.sh +46 -4
  157. package/runtime/prime/bin/session-autosave.sh +13 -2
  158. package/runtime/prime/bin/settings.sh +63 -4
  159. package/runtime/prime/bin/worktree-create.sh +4 -1
  160. package/runtime/prime/manifest.json +5 -1
@@ -29,6 +29,48 @@ SLUG=$(jq -r '.slug // "egregore"' "$SCRIPT_DIR/egregore.json" 2>/dev/null || ec
29
29
  COLLECTION="${SLUG}-memory"
30
30
  MEM_PATH="$(readlink -f "$SCRIPT_DIR/memory" 2>/dev/null || true)"
31
31
 
32
+ # qmd 2.5.x may render --full-path results as absolute `**file:**` paths,
33
+ # while older output uses qmd:// URIs. Normalize both to the canonical
34
+ # memory/... form users can open from an Egregore checkout, and parse both
35
+ # forms when counting hits or attaching graph state.
36
+ _normalize_file_paths() {
37
+ local line absolute_prefix uri_prefix
38
+ absolute_prefix="**file:** \`$MEM_PATH/"
39
+ uri_prefix="**file:** \`qmd://${COLLECTION}/"
40
+ while IFS= read -r line || [ -n "$line" ]; do
41
+ if [[ "$line" == "$absolute_prefix"* ]]; then
42
+ printf '**file:** `memory/%s\n' "${line#"$absolute_prefix"}"
43
+ elif [[ "$line" == "$uri_prefix"* ]]; then
44
+ printf '**file:** `memory/%s\n' "${line#"$uri_prefix"}"
45
+ else
46
+ printf '%s\n' "$line"
47
+ fi
48
+ done
49
+ }
50
+
51
+ _result_paths() {
52
+ local line path canonical_prefix absolute_prefix uri_prefix
53
+ canonical_prefix="**file:** \`memory/"
54
+ absolute_prefix="**file:** \`$MEM_PATH/"
55
+ uri_prefix="**file:** \`qmd://${COLLECTION}/"
56
+ while IFS= read -r line || [ -n "$line" ]; do
57
+ path=""
58
+ if [[ "$line" == "$canonical_prefix"* ]]; then
59
+ path="${line#"$canonical_prefix"}"
60
+ elif [[ "$line" == "$absolute_prefix"* ]]; then
61
+ path="${line#"$absolute_prefix"}"
62
+ elif [[ "$line" == "$uri_prefix"* ]]; then
63
+ path="${line#"$uri_prefix"}"
64
+ elif [[ "$line" == *"qmd://${COLLECTION}/"* ]]; then
65
+ path="${line#*"qmd://${COLLECTION}/"}"
66
+ fi
67
+ path="${path%%\`*}"
68
+ case "$path" in
69
+ *.md*) printf '%s\n' "${path%%.md*}.md" ;;
70
+ esac
71
+ done | sort -u
72
+ }
73
+
32
74
  QMD_VERSION="2.5.3" # pinned — bump deliberately, never float @latest
33
75
 
34
76
  _qmd() {
@@ -104,7 +146,7 @@ _enrich() {
104
146
  local results paths params out
105
147
  results=$(cat)
106
148
  echo "$results"
107
- paths=$(echo "$results" | grep -o "qmd://${COLLECTION}/[^: ]*\.md" | sed "s|qmd://${COLLECTION}/||" | sort -u)
149
+ paths=$(printf '%s\n' "$results" | _result_paths)
108
150
  [ -z "$paths" ] && return 0
109
151
  params=$(printf '%s\n' "$paths" | jq -R . | jq -sc '{paths: .}')
110
152
  out=$(bash "$SCRIPT_DIR/bin/graph.sh" query "UNWIND \$paths AS fp
@@ -167,7 +209,7 @@ cmd_query() {
167
209
  local t0 out label
168
210
  t0=$(date +%s)
169
211
  if [ "$mode" != "search" ]; then
170
- out=$(_qmd "$mode" "$q" -c "$COLLECTION" -n "$n" --format md --full-path "${all[@]}" 2>/dev/null | _clean)
212
+ out=$(_qmd "$mode" "$q" -c "$COLLECTION" -n "$n" --format md --full-path "${all[@]}" 2>/dev/null | _clean | _normalize_file_paths)
171
213
  if [ -n "$out" ] && [ "$out" != "No results found." ]; then
172
214
  [ "$mode" = "query" ] && label="hybrid" || label="semantic"
173
215
  _banner_and_emit "$label" "$t0" "$emit" "$q" "$out"
@@ -176,7 +218,7 @@ cmd_query() {
176
218
  echo "_(hybrid/semantic returned nothing — showing keyword results. If this persists, run: bash bin/search.sh reindex --embed)_"
177
219
  echo ""
178
220
  fi
179
- out=$(_qmd search "$q" -c "$COLLECTION" -n "$n" --format md --full-path "${all[@]}" | _clean)
221
+ out=$(_qmd search "$q" -c "$COLLECTION" -n "$n" --format md --full-path "${all[@]}" | _clean | _normalize_file_paths)
180
222
  _banner_and_emit "keyword" "$t0" "$emit" "$q" "$out"
181
223
  }
182
224
 
@@ -189,7 +231,7 @@ cmd_query() {
189
231
  _banner_and_emit() {
190
232
  local label="$1" t0="$2" emit="$3" q="$4" out="$5"
191
233
  local hits dur modef product surface plural=""
192
- hits=$(printf '%s\n' "$out" | grep -c '^qmd://' 2>/dev/null | tr -d ' ')
234
+ hits=$(printf '%s\n' "$out" | _result_paths | wc -l | tr -d ' ')
193
235
  dur=$(( $(date +%s) - t0 ))
194
236
  modef="$label"
195
237
  product="Egregore"
@@ -29,6 +29,12 @@
29
29
 
30
30
  set -uo pipefail
31
31
 
32
+ # shellcheck source=bin/lib/git-message.sh
33
+ . "$(cd "$(dirname "$0")" && pwd)/lib/git-message.sh" 2>/dev/null || true
34
+ type egregore_commit >/dev/null 2>&1 || egregore_commit() {
35
+ local gd="$1" m="$3"; shift 3; git -C "$gd" commit -m "$m" "$@"
36
+ }
37
+
32
38
  DIR=""
33
39
  AUTHOR=""
34
40
  DEBOUNCE=0
@@ -79,7 +85,12 @@ git rev-parse --git-dir >/dev/null 2>&1 || exit 0
79
85
  DIR_HASH=$( { md5sum <<<"$DIR" 2>/dev/null || md5 -q -s "$DIR" 2>/dev/null || echo default; } | cut -c1-8 )
80
86
  STAMP="/tmp/.egregore-autosave-${DIR_HASH}"
81
87
  if [ "$DEBOUNCE" -gt 0 ] && [ -f "$STAMP" ]; then
82
- LAST=$(stat -f %m "$STAMP" 2>/dev/null || stat -c %Y "$STAMP" 2>/dev/null || echo 0)
88
+ if stat -c %Y "$STAMP" >/dev/null 2>&1; then
89
+ LAST=$(stat -c %Y "$STAMP")
90
+ else
91
+ LAST=$(stat -f %m "$STAMP" 2>/dev/null || echo 0)
92
+ fi
93
+ case "$LAST" in ""|*[!0-9]*) LAST=0 ;; esac
83
94
  [ $(( $(date +%s) - LAST )) -lt "$DEBOUNCE" ] && exit 0
84
95
  fi
85
96
  touch "$STAMP" 2>/dev/null || true
@@ -118,7 +129,7 @@ fi
118
129
  if git -C "$DIR/memory" rev-parse --git-dir >/dev/null 2>&1; then
119
130
  if [ -n "$(git -C "$DIR/memory" status --porcelain 2>/dev/null)" ]; then
120
131
  git -C "$DIR/memory" add -A >/dev/null 2>&1 || true
121
- git -C "$DIR/memory" commit -m "Auto-save: session content" --quiet 2>/dev/null || true
132
+ egregore_commit "$DIR/memory" "$DIR" "chore(autosave): save session work" --quiet 2>/dev/null || true
122
133
  fi
123
134
  if [ -n "$(git -C "$DIR/memory" log origin/main..HEAD --oneline 2>/dev/null)" ]; then
124
135
  for _try in 1 2 3; do
@@ -3,14 +3,16 @@ set -euo pipefail
3
3
 
4
4
  # settings.sh — deterministic config verbs for an Egregore instance.
5
5
  #
6
- # Edits egregore.json atomically. No agent, no network, no session. Idempotent:
7
- # re-adding an existing item is a no-op success; removing a missing one is too.
6
+ # Edits egregore.json atomically. No agent, no session. Idempotent: re-adding
7
+ # an existing item is a no-op success; removing a missing one is too. Switching
8
+ # to staged releases is the one networked verb: it creates origin/develop first.
8
9
  # This is the deterministic core the launcher settings screen (and slash
9
10
  # commands) call — the reliability lives here, the surfaces are thin callers.
10
11
  #
11
12
  # Usage:
12
13
  # settings.sh hosting status|on|off
13
14
  # settings.sh relay status|on|off
15
+ # settings.sh workflow status|simple|staged
14
16
  # settings.sh repo list | add <name> [description] | remove <name>
15
17
  # settings.sh admin list | add <github-handle> | remove <github-handle>
16
18
  # settings.sh dump # full settings snapshot as JSON (for the launcher)
@@ -53,6 +55,7 @@ settings.sh — Egregore instance settings
53
55
 
54
56
  settings.sh hosting status|on|off
55
57
  settings.sh relay status|on|off
58
+ settings.sh workflow status|simple|staged
56
59
  settings.sh repo list | add <name> [description] | remove <name>
57
60
  settings.sh admin list | add <github-handle> | remove <github-handle>
58
61
  settings.sh people list | add <github-handle> | remove <github-handle>
@@ -114,6 +117,54 @@ cmd_relay() {
114
117
  esac
115
118
  }
116
119
 
120
+ cmd_workflow() {
121
+ local action="${1:-status}"
122
+ local base
123
+ base="$(jq -r 'if has("base_branch") then .base_branch else "develop" end' "$CONFIG" 2>/dev/null)"
124
+ case "$action" in
125
+ status)
126
+ local workflow="custom"
127
+ [ "$base" = "main" ] && workflow="simple"
128
+ [ "$base" = "develop" ] && workflow="staged"
129
+ if [ "$JSON" = 1 ]; then
130
+ jq -n --arg workflow "$workflow" --arg base_branch "$base" \
131
+ '{domain:"workflow", workflow:$workflow, base_branch:$base_branch}'
132
+ elif [ "$workflow" = "simple" ]; then
133
+ echo "Git workflow: SIMPLE — pull requests target main"
134
+ elif [ "$workflow" = "staged" ]; then
135
+ echo "Git workflow: STAGED — pull requests target develop; releases promote to main"
136
+ else
137
+ echo "Git workflow: CUSTOM — pull requests target $base"
138
+ fi
139
+ ;;
140
+ simple)
141
+ if [ "$base" != "main" ]; then
142
+ git -C "$SCRIPT_DIR" rev-parse --git-dir >/dev/null 2>&1 \
143
+ || _die "cannot switch workflow: $SCRIPT_DIR is not a Git repository" 1
144
+ git -C "$SCRIPT_DIR" ls-remote --exit-code --heads origin main >/dev/null 2>&1 \
145
+ || _die "cannot switch workflow: origin/main does not exist or could not be reached" 1
146
+ _save '.base_branch = "main"'
147
+ fi
148
+ echo "Git workflow: SIMPLE — pull requests now target main"
149
+ ;;
150
+ staged)
151
+ if [ "$base" != "develop" ]; then
152
+ git -C "$SCRIPT_DIR" rev-parse --git-dir >/dev/null 2>&1 \
153
+ || _die "cannot switch workflow: $SCRIPT_DIR is not a Git repository" 1
154
+ bash "$SCRIPT_DIR/bin/lib/ensure-develop.sh" "$SCRIPT_DIR" >/dev/null \
155
+ || _die "could not create develop; workflow is unchanged" 1
156
+ git -C "$SCRIPT_DIR" ls-remote --exit-code --heads origin develop >/dev/null 2>&1 \
157
+ || _die "could not verify origin/develop; workflow is unchanged" 1
158
+ _save '.base_branch = "develop"'
159
+ elif ! jq -e 'has("base_branch")' "$CONFIG" >/dev/null 2>&1; then
160
+ _save '.base_branch = "develop"'
161
+ fi
162
+ echo "Git workflow: STAGED — pull requests now target develop; releases promote to main"
163
+ ;;
164
+ *) _die "usage: settings.sh workflow status|simple|staged" 1 ;;
165
+ esac
166
+ }
167
+
117
168
  cmd_repo() {
118
169
  local action="${1:-list}"; shift || true
119
170
  case "$action" in
@@ -232,7 +283,7 @@ _people_file() {
232
283
  rm -f "$f"
233
284
  fi
234
285
  ( cd "$SCRIPT_DIR/memory" 2>/dev/null && git add -A people/ 2>/dev/null \
235
- && git commit -q -m "settings: people $op $user" 2>/dev/null \
286
+ && git commit -q -m "chore(settings): $op $user in people" 2>/dev/null \
236
287
  && git push -q 2>/dev/null ) || true
237
288
  }
238
289
 
@@ -273,6 +324,13 @@ cmd_dump() {
273
324
  slug: .slug,
274
325
  hosting: (.features.publishing != false),
275
326
  public_relay: (.features.public_relay == true),
327
+ workflow: (
328
+ if ((if has("base_branch") then .base_branch else "develop" end) == "main") then "simple"
329
+ elif ((if has("base_branch") then .base_branch else "develop" end) == "develop") then "staged"
330
+ else "custom"
331
+ end
332
+ ),
333
+ base_branch: (if has("base_branch") then .base_branch else "develop" end),
276
334
  repos: [.repos[]? | if type=="object" then . else {name:.} end],
277
335
  admins: (.admins // []),
278
336
  people: $people
@@ -295,10 +353,11 @@ DOMAIN="${1:-}"; shift || true
295
353
  case "$DOMAIN" in
296
354
  hosting) cmd_hosting "$@" ;;
297
355
  relay) cmd_relay "$@" ;;
356
+ workflow) cmd_workflow "$@" ;;
298
357
  repo) cmd_repo "$@" ;;
299
358
  admin) cmd_admin "$@" ;;
300
359
  people) cmd_people "$@" ;;
301
360
  dump) cmd_dump ;;
302
361
  ""|-h|--help|help) usage 0 ;;
303
- *) _die "unknown settings domain: '$DOMAIN' (try: hosting, relay, repo, admin, people, dump)" 1 ;;
362
+ *) _die "unknown settings domain: '$DOMAIN' (try: hosting, relay, workflow, repo, admin, people, dump)" 1 ;;
304
363
  esac
@@ -48,7 +48,10 @@ git -C "$REPO_ROOT" fetch origin "$BASE_BRANCH" --quiet 2>/dev/null || true
48
48
 
49
49
  # --- Create branch (idempotent — skip if exists) ---
50
50
  if ! git -C "$REPO_ROOT" show-ref --verify --quiet "refs/heads/$BRANCH" 2>/dev/null; then
51
- git -C "$REPO_ROOT" branch "$BRANCH" "origin/$BASE_BRANCH" >/dev/null 2>&1 || {
51
+ # A task branch starts at the integration branch but must never track it.
52
+ # Otherwise `git push` can target origin/$BASE_BRANCH (especially when the
53
+ # user's push.default is `upstream`) before the first explicit task push.
54
+ git -C "$REPO_ROOT" branch --no-track "$BRANCH" "origin/$BASE_BRANCH" >/dev/null 2>&1 || {
52
55
  echo "Error: failed to create branch $BRANCH" >&2
53
56
  exit 1
54
57
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "source": "egregore-runtime",
3
3
  "policy": "available OSS components selected by capability-distribution.json; Connect is an authenticated additive overlay",
4
- "skillCount": 46,
4
+ "skillCount": 47,
5
5
  "skills": [
6
6
  "activity",
7
7
  "announce",
@@ -19,6 +19,7 @@
19
19
  "handoff",
20
20
  "harvest",
21
21
  "ingest",
22
+ "ingest-corpus",
22
23
  "ingest-notion",
23
24
  "ingest-user-interview",
24
25
  "invite",
@@ -74,6 +75,7 @@
74
75
  ".codex/skills/handoff/SKILL.md",
75
76
  ".codex/skills/harvest/QUESTION_PALETTE.md",
76
77
  ".codex/skills/harvest/SKILL.md",
78
+ ".codex/skills/ingest-corpus/SKILL.md",
77
79
  ".codex/skills/ingest-notion/SKILL.md",
78
80
  ".codex/skills/ingest-user-interview/SKILL.md",
79
81
  ".codex/skills/ingest/SKILL.md",
@@ -121,6 +123,7 @@
121
123
  "bin/codex-skill-render.mjs",
122
124
  "bin/codex-sync-skills.sh",
123
125
  "bin/connect-refresh.sh",
126
+ "bin/contribute-guard.sh",
124
127
  "bin/dashboard-data.sh",
125
128
  "bin/graph-batch.sh",
126
129
  "bin/graph-op.sh",
@@ -141,6 +144,7 @@
141
144
  "bin/lib/context.sh",
142
145
  "bin/lib/dashboard-artifact.sh",
143
146
  "bin/lib/ensure-develop.sh",
147
+ "bin/lib/git-message.sh",
144
148
  "bin/lib/git-sync.sh",
145
149
  "bin/lib/greeting.sh",
146
150
  "bin/lib/hash.sh",
@@ -1,6 +1,9 @@
1
1
  [features]
2
2
  hooks = true
3
3
 
4
+ [mcp_servers.notion]
5
+ url = "https://mcp.notion.com/mcp"
6
+
4
7
  [tui]
5
8
  # Codex currently accepts built-in footer item IDs only. Egregore's dynamic
6
9
  # ◆ CONNECTED / ◇ LOCAL identity is rendered by bin/codex-session-start.sh.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: archive
3
- description: 'Fallback Codex adapter for the Egregore archive workflow.'
3
+ description: 'Capture an effective prompting technique or steering pattern as reusable knowledge. Use for /archive, or when a prompt worked especially well and is worth reusing — not insight about the work itself (/reflect).'
4
4
  ---
5
5
 
6
6
  <!-- generated-by: bin/codex-sync-skills.sh -->
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: branch
3
- description: 'Fallback Codex adapter for the Egregore branch workflow.'
3
+ description: 'Create a working branch from what you are about to work on. Use for /branch, or any request to start a new branch before making changes.'
4
4
  ---
5
5
 
6
6
  <!-- generated-by: bin/codex-sync-skills.sh -->
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: checkup
3
- description: 'Fallback Codex adapter for the Egregore checkup workflow.'
3
+ description: 'Run diagnostics on your Egregore environment and render a health report, auto-fixing what it can. Use for /checkup, a health check, or when something is broken and the root cause is unclear.'
4
4
  ---
5
5
 
6
6
  <!-- generated-by: bin/codex-sync-skills.sh -->
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: commit
3
- description: 'Fallback Codex adapter for the Egregore commit workflow.'
3
+ description: 'Stage changes and create a commit with a properly formatted message. Use for /commit, or saving work locally — not sharing it (/push) or opening a pull request (/pr).'
4
4
  ---
5
5
 
6
6
  <!-- generated-by: bin/codex-sync-skills.sh -->
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: contribute
3
- description: 'Fallback Codex adapter for the Egregore contribute workflow.'
3
+ description: 'Contribute an improvement back to the upstream Egregore framework as a cross-fork pull request. Use for /contribute, or submitting a framework fix upstream — not saving org work (/save) or filing a bug (/issue).'
4
4
  ---
5
5
 
6
6
  <!-- generated-by: bin/codex-sync-skills.sh -->
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: delete-user
3
- description: 'Fallback Codex adapter for the Egregore delete-user workflow.'
3
+ description: 'Remove a member from this Egregore, revoking access across GitHub, Supabase, and Neo4j. Use for /delete-user, removing or kicking someone — not inviting (/invite) or viewing members (/dashboard).'
4
4
  ---
5
5
 
6
6
  <!-- generated-by: bin/codex-sync-skills.sh -->
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ingest
3
- description: 'Fallback Codex adapter for the Egregore ingest workflow.'
3
+ description: 'Unified ingestion entry point — brings files, meetings, Google Workspace, Notion, or bulk corpora into intake, then promotes useful material into curated memory. Say ''ingest'', ''bring this into Egregore''.'
4
4
  ---
5
5
 
6
6
  <!-- generated-by: bin/codex-sync-skills.sh -->
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: ingest-corpus
3
+ description: 'Turn a large folder of documents into a Connect-only knowledge base that answers questions with sources. Say ''build a knowledge base''. Not a few files (/ingest) or a meeting/Notion/Google source.'
4
+ ---
5
+
6
+ <!-- generated-by: bin/codex-sync-skills.sh -->
7
+
8
+ # Egregore ingest-corpus Adapter
9
+
10
+ This is fallback coverage for a long-tail Egregore workflow that has not been
11
+ ported to a hand-written Codex-native skill yet.
12
+
13
+ Use the project shell and filesystem directly. Do not invoke Claude Code
14
+ commands. Translate interactive choices to structured Codex question tooling
15
+ when it is available; otherwise render compact numbered choices with an
16
+ `Other:` option and wait for the user.
17
+
18
+ 1. Read `.claude/skills/ingest-corpus/SKILL.md` for the workflow details.
19
+ 2. Run the referenced `bin/` scripts directly from Codex.
20
+ 3. Treat graph and publish steps as best-effort unless that workflow explicitly
21
+ says they are required.
22
+ 4. For every external notification, follow
23
+ `.claude/context/notification-consent.md`: plan without sending, then show
24
+ a separate exact Send / Edit / Cancel checkpoint. Never infer notification
25
+ consent from the workflow request or a batch approval.
26
+ 5. Keep local-mode behavior filesystem-first and avoid graph or notification
27
+ calls when `egregore.json` declares `"mode": "local"`.
28
+ 6. Never call the deprecated `egregore-handoff` CLI for Egregore project
29
+ handoffs.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ingest-notion
3
- description: 'Fallback Codex adapter for the Egregore ingest-notion workflow.'
3
+ description: 'Bring selected Notion pages into shared Egregore memory via Notion''s official MCP. Routed from /ingest when the source is Notion — say ''/ingest notion''. Selected pages only, not a full-workspace sync.'
4
4
  ---
5
5
 
6
6
  <!-- generated-by: bin/codex-sync-skills.sh -->
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ingest-user-interview
3
- description: 'Fallback Codex adapter for the Egregore ingest-user-interview workflow.'
3
+ description: 'Analyze user interview transcripts (Granola, pasted text, or a file) through a 3-analyst-agent plus Opus-synthesis pipeline. Say ''process the interview'', ''onboarding interview'', ''research call''.'
4
4
  ---
5
5
 
6
6
  <!-- generated-by: bin/codex-sync-skills.sh -->
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: issue
3
- description: 'Fallback Codex adapter for the Egregore issue workflow.'
3
+ description: 'Report an issue — captures context and routes it to the right place. Say ''this is broken'', ''bug in'', ''file an issue'', ''report a problem''. Not a personal task (/todo) or team exploration (/quest).'
4
4
  ---
5
5
 
6
6
  <!-- generated-by: bin/codex-sync-skills.sh -->
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: me
3
- description: 'Fallback Codex adapter for the Egregore me workflow.'
3
+ description: 'View or change your member identity — display name, email — shared across Claude Code, Codex, and Pi. Say ''who am I'', ''call me <name>'', ''change my name to X'', or run ''/me''.'
4
4
  ---
5
5
 
6
6
  <!-- generated-by: bin/codex-sync-skills.sh -->
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: meeting
3
- description: 'Fallback Codex adapter for the Egregore meeting workflow.'
3
+ description: 'Use for /meeting, /meeting sync, /meeting backfill, or a search term — adaptively analyzes a Granola meeting into decisions, findings, actions, and continuity in shared memory.'
4
4
  ---
5
5
 
6
6
  <!-- generated-by: bin/codex-sync-skills.sh -->
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: note
3
- description: 'Fallback Codex adapter for the Egregore note workflow.'
3
+ description: 'Use when the user says ''jot this down'', ''note to self'', ''just thinking out loud'', or ''park this thought'' — saves a private personal note, never shared or pushed until explicitly promoted.'
4
4
  ---
5
5
 
6
6
  <!-- generated-by: bin/codex-sync-skills.sh -->
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: notion-connect
3
- description: 'Fallback Codex adapter for the Egregore notion-connect workflow.'
3
+ description: 'Use for ''connect notion'', ''notion status'', or ''disconnect notion'' — connects the current agent runtime directly to Notion''s official hosted MCP for search and fetch, or checks/revokes that connection.'
4
4
  ---
5
5
 
6
6
  <!-- generated-by: bin/codex-sync-skills.sh -->
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: onboarding
3
- description: 'Fallback Codex adapter for the Egregore onboarding workflow.'
3
+ description: 'Use for /onboarding, or when a new member''s onboarding is not yet complete — runs the deterministic VERIFY, ORIENT, INVITE, FIRST_HANDOFF welcome flow.'
4
4
  ---
5
5
 
6
6
  <!-- generated-by: bin/codex-sync-skills.sh -->
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: pr
3
- description: 'Fallback Codex adapter for the Egregore pr workflow.'
3
+ description: 'Use for /pr, or ''create a PR'' / ''open a pull request'' — creates a pull request for the current branch against the repo''s base branch with a formatted title and body. Not for reviewing an existing PR (review-pr).'
4
4
  ---
5
5
 
6
6
  <!-- generated-by: bin/codex-sync-skills.sh -->
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: pull
3
- description: 'Fallback Codex adapter for the Egregore pull workflow.'
3
+ description: 'Use for /pull when you need to sync the current branch and shared memory without also viewing activity (/activity auto-syncs already).'
4
4
  ---
5
5
 
6
6
  <!-- generated-by: bin/codex-sync-skills.sh -->
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: push
3
- description: 'Fallback Codex adapter for the Egregore push workflow.'
3
+ description: 'Use for /push, or ''push my branch'' — pushes the current branch to origin, setting upstream on first push, before opening a PR with /pr.'
4
4
  ---
5
5
 
6
6
  <!-- generated-by: bin/codex-sync-skills.sh -->
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: reflect
3
- description: 'Fallback Codex adapter for the Egregore reflect workflow.'
3
+ description: 'Use when the user says ''we decided'', ''I realized'', or ''that''s a pattern'' — captures decisions, findings, or patterns in shared memory. Not a private half-baked thought (/note) or cross-referencing (/deep-reflect).'
4
4
  ---
5
5
 
6
6
  <!-- generated-by: bin/codex-sync-skills.sh -->
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: review-pr
3
- description: 'Fallback Codex adapter for the Egregore review-pr workflow.'
3
+ description: 'Use when the user says ''review PR'', ''is this PR safe to merge'', or ''audit PR'' — runs a CTO-level 10-point review checklist on one or more pull requests. Not creating a PR (/pr) or validating local changes (/test).'
4
4
  ---
5
5
 
6
6
  <!-- generated-by: bin/codex-sync-skills.sh -->
@@ -81,7 +81,9 @@ Where should {name} live?
81
81
  twice.
82
82
  5. Synthesize:
83
83
  - a short topic from the work,
84
- - a clear commit message,
84
+ - a commit message per `.claude/context/commit-format.md` — subject
85
+ `type(scope): imperative summary`, type/scope derived from the work
86
+ itself (never `chore(save):` for real work),
85
87
  - a one-line user-facing scope summary,
86
88
  - a PR description following `.claude/context/pr-format.md`:
87
89
  `## What` (1–4 bullets), `## Why` (1–3 sentences), and
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: slack-connect
3
- description: 'Fallback Codex adapter for the Egregore slack-connect workflow.'
3
+ description: 'Set up Slack as a notification channel for your Egregore — creates the workspace app, invites the bot, and binds a channel. Use for /slack-connect, ''connect slack'', or ''set up slack notifications''.'
4
4
  ---
5
5
 
6
6
  <!-- generated-by: bin/codex-sync-skills.sh -->
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: summon
3
- description: 'Fallback Codex adapter for the Egregore summon workflow.'
3
+ description: 'Design and launch a persistent agent (a spirit) that runs on a schedule or watches for conditions, via adaptive questioning that produces a reviewable spec before launch.'
4
4
  ---
5
5
 
6
6
  <!-- generated-by: bin/codex-sync-skills.sh -->
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: sync-repos
3
- description: 'Fallback Codex adapter for the Egregore sync-repos workflow.'
3
+ description: 'Smart sync of all Egregore repos (memory + managed repos + current repo) — fetches first, only pulls if behind. Use for /sync-repos or ''sync all repos''.'
4
4
  ---
5
5
 
6
6
  <!-- generated-by: bin/codex-sync-skills.sh -->
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: teams-connect
3
- description: 'Fallback Codex adapter for the Egregore teams-connect workflow.'
3
+ description: 'Set up Microsoft Teams as a notification channel for your Egregore — registers an Azure bot, uploads the app, and binds a channel. Use for /teams-connect, ''connect teams'', or ''set up teams notifications''.'
4
4
  ---
5
5
 
6
6
  <!-- generated-by: bin/codex-sync-skills.sh -->
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: telegram-connect
3
- description: 'Fallback Codex adapter for the Egregore telegram-connect workflow.'
3
+ description: 'Set up Telegram as a notification center for your Egregore — creates the group, links the bot, and stores the chat ID. Use for /telegram-connect, ''connect telegram'', or ''set up telegram notifications''.'
4
4
  ---
5
5
 
6
6
  <!-- generated-by: bin/codex-sync-skills.sh -->
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: telemetry
3
- description: 'Fallback Codex adapter for the Egregore telemetry workflow.'
3
+ description: 'Manage your own telemetry settings — check status, opt in/out, view or clear the buffered events. Use for /telemetry, ''turn off telemetry'', or ''what data do you collect''.'
4
4
  ---
5
5
 
6
6
  <!-- generated-by: bin/codex-sync-skills.sh -->
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: test
3
- description: 'Fallback Codex adapter for the Egregore test workflow.'
3
+ description: 'Validate changes before /save — static analysis plus live Cypher validation against the graph, rendered as a pass/fail gate. Use for /test or ''test my changes''.'
4
4
  ---
5
5
 
6
6
  <!-- generated-by: bin/codex-sync-skills.sh -->
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: tutorial
3
- description: 'Fallback Codex adapter for the Egregore tutorial workflow.'
3
+ description: 'Interactive walkthrough of Egregore''s core loop — /activity, /reflect, and /quest or /add — with adaptive questions and real artifacts. Use for /tutorial or ''walk me through Egregore''.'
4
4
  ---
5
5
 
6
6
  <!-- generated-by: bin/codex-sync-skills.sh -->
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: update
3
- description: 'Fallback Codex adapter for the Egregore update workflow.'
3
+ description: 'Update local Egregore environment — sync the framework from upstream, run post-update migrations, and pull repos. Use for /update or when framework behavior seems broken or missing.'
4
4
  ---
5
5
 
6
6
  <!-- generated-by: bin/codex-sync-skills.sh -->