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,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-prime-meta-harness",
3
3
  "policy": "Prime Agent-native lifecycle layer over the available OSS Codex skill corpus",
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",
@@ -73,6 +74,7 @@
73
74
  ".codex/skills/handoff/SKILL.md",
74
75
  ".codex/skills/harvest/QUESTION_PALETTE.md",
75
76
  ".codex/skills/harvest/SKILL.md",
77
+ ".codex/skills/ingest-corpus/SKILL.md",
76
78
  ".codex/skills/ingest-notion/SKILL.md",
77
79
  ".codex/skills/ingest-user-interview/SKILL.md",
78
80
  ".codex/skills/ingest/SKILL.md",
@@ -127,6 +129,7 @@
127
129
  "bin/codex-skill-render.mjs",
128
130
  "bin/codex-sync-skills.sh",
129
131
  "bin/connect-refresh.sh",
132
+ "bin/contribute-guard.sh",
130
133
  "bin/dashboard-data.sh",
131
134
  "bin/graph-batch.sh",
132
135
  "bin/graph-op.sh",
@@ -147,6 +150,7 @@
147
150
  "bin/lib/context.sh",
148
151
  "bin/lib/dashboard-artifact.sh",
149
152
  "bin/lib/ensure-develop.sh",
153
+ "bin/lib/git-message.sh",
150
154
  "bin/lib/git-sync.sh",
151
155
  "bin/lib/greeting.sh",
152
156
  "bin/lib/hash.sh",