create-egregore 0.19.21 → 0.19.23
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/assets/egregore-launcher.js +29 -3
- package/bin/cli.js +3 -4
- package/lib/auth.js +3 -4
- package/lib/path-lookup.js +59 -0
- package/lib/setup.js +52 -6
- package/package.json +2 -2
- package/runtime/codex/.claude/context/notification-consent.md +66 -0
- package/runtime/codex/.codex/hooks/branch-guard.js +14 -3
- package/runtime/codex/.codex/skills/add/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/announce/SKILL.md +21 -8
- package/runtime/codex/.codex/skills/answer/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/archive/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/ask/SKILL.md +14 -6
- package/runtime/codex/.codex/skills/audit/SKILL.md +29 -0
- package/runtime/codex/.codex/skills/autosave/SKILL.md +29 -0
- package/runtime/codex/.codex/skills/branch/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/checkup/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/commit/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/contribute/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/dark-mode/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/delete-user/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/demo-mode/SKILL.md +29 -0
- package/runtime/codex/.codex/skills/deploy-bridge/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/design/SKILL.md +29 -0
- package/runtime/codex/.codex/skills/egregore-voice/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/emissary/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/env/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/handoff/SKILL.md +81 -10
- package/runtime/codex/.codex/skills/harvest/QUESTION_PALETTE.md +76 -0
- package/runtime/codex/.codex/skills/harvest/SKILL.md +30 -6
- package/runtime/codex/.codex/skills/ingest/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/ingest-google/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/ingest-user-interview/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/invite/SKILL.md +6 -2
- package/runtime/codex/.codex/skills/issue/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/me/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/meeting/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/minion/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/mock/SKILL.md +29 -0
- package/runtime/codex/.codex/skills/note/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/onboarding/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/pr/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/product-voice/SKILL.md +29 -0
- package/runtime/codex/.codex/skills/project/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/pull/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/push/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/quest/SKILL.md +6 -3
- package/runtime/codex/.codex/skills/quest-suggest/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/reflect/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/review-pr/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/save/SKILL.md +6 -4
- package/runtime/codex/.codex/skills/scroll/SKILL.md +92 -23
- package/runtime/codex/.codex/skills/scroll/assets/shell.html +381 -52
- package/runtime/codex/.codex/skills/session-view/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/setup/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/summon/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/sync-repos/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/task/SKILL.md +9 -5
- package/runtime/codex/.codex/skills/teams-connect/SKILL.md +29 -0
- package/runtime/codex/.codex/skills/telegram-connect/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/telemetry/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/test/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/thread/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/todo/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/tui-design/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/tutorial/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/update/SKILL.md +8 -4
- package/runtime/codex/.codex/skills/visual-explain/SKILL.md +8 -4
- package/runtime/codex/.codex/spec-manifest.json +4 -4
- package/runtime/codex/AGENTS.md +36 -14
- package/runtime/codex/bin/activity-data.sh +1 -1
- package/runtime/codex/bin/agent.sh +38 -19
- package/runtime/codex/bin/attendant.sh +8 -2
- package/runtime/codex/bin/autosave.sh +1 -1
- package/runtime/codex/bin/capture-reconcile.sh +8 -6
- package/runtime/codex/bin/capture-run.sh +1 -1
- package/runtime/codex/bin/codex-install-skills.sh +1 -1
- package/runtime/codex/bin/codex-render-spec.mjs +12 -5
- package/runtime/codex/bin/codex-session-start.sh +1 -1
- package/runtime/codex/bin/codex-skill-render.mjs +5 -0
- package/runtime/codex/bin/codex-sync-skills.sh +9 -5
- package/runtime/codex/bin/dashboard-data.sh +1 -1
- package/runtime/codex/bin/graph-batch.sh +1 -1
- package/runtime/codex/bin/graph-op.sh +1 -1
- package/runtime/codex/bin/graph-wal.sh +1 -1
- package/runtime/codex/bin/graph.sh +1 -1
- package/runtime/codex/bin/handoff-pr-backfill.sh +1 -1
- package/runtime/codex/bin/handoff-run.sh +117 -119
- package/runtime/codex/bin/handoff-save-egregore.sh +62 -32
- package/runtime/codex/bin/index-handoff.sh +3 -2
- package/runtime/codex/bin/ingest-graph.sh +1 -1
- package/runtime/codex/bin/ingest.sh +1 -1
- package/runtime/codex/bin/lib/artifact-id.sh +1 -1
- package/runtime/codex/bin/lib/config.sh +56 -20
- package/runtime/codex/bin/lib/context.sh +7 -1
- package/runtime/codex/bin/lib/ensure-develop.sh +1 -1
- package/runtime/codex/bin/lib/git-sync.sh +145 -59
- package/runtime/codex/bin/lib/greeting.sh +14 -0
- package/runtime/codex/bin/lib/hash.sh +1 -1
- package/runtime/codex/bin/lib/noncode.sh +1 -1
- package/runtime/codex/bin/lib/time.sh +1 -1
- package/runtime/codex/bin/notify.sh +492 -153
- package/runtime/codex/bin/person.sh +1 -1
- package/runtime/codex/bin/publish-artifact.sh +64 -8
- package/runtime/codex/bin/publish-references.sh +1 -1
- package/runtime/codex/bin/repo-state.sh +7 -10
- package/runtime/codex/bin/search.sh +1 -1
- package/runtime/codex/bin/session-autosave.sh +1 -1
- package/runtime/codex/bin/session-log.sh +1 -1
- package/runtime/codex/bin/settings.sh +32 -2
- package/runtime/codex/bin/telemetry.sh +1 -1
- package/runtime/codex/bin/worktree-create.sh +14 -4
- package/runtime/codex/bin/worktree-remove.sh +1 -1
- package/runtime/codex/bin/worktree.sh +1 -1
- package/runtime/codex/manifest.json +18 -1
- package/runtime/pi/.claude/context/notification-consent.md +66 -0
- package/runtime/pi/.codex/hooks/branch-guard.js +14 -3
- package/runtime/pi/.codex/skills/add/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/announce/SKILL.md +21 -8
- package/runtime/pi/.codex/skills/answer/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/archive/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/ask/SKILL.md +14 -6
- package/runtime/pi/.codex/skills/audit/SKILL.md +29 -0
- package/runtime/pi/.codex/skills/autosave/SKILL.md +29 -0
- package/runtime/pi/.codex/skills/branch/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/checkup/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/commit/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/contribute/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/dark-mode/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/delete-user/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/demo-mode/SKILL.md +29 -0
- package/runtime/pi/.codex/skills/deploy-bridge/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/design/SKILL.md +29 -0
- package/runtime/pi/.codex/skills/egregore-voice/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/emissary/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/env/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/handoff/SKILL.md +81 -10
- package/runtime/pi/.codex/skills/harvest/QUESTION_PALETTE.md +76 -0
- package/runtime/pi/.codex/skills/harvest/SKILL.md +30 -6
- package/runtime/pi/.codex/skills/ingest/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/ingest-google/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/ingest-user-interview/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/invite/SKILL.md +6 -2
- package/runtime/pi/.codex/skills/issue/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/me/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/meeting/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/minion/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/mock/SKILL.md +29 -0
- package/runtime/pi/.codex/skills/note/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/onboarding/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/pr/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/product-voice/SKILL.md +29 -0
- package/runtime/pi/.codex/skills/project/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/pull/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/push/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/quest/SKILL.md +6 -3
- package/runtime/pi/.codex/skills/quest-suggest/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/reflect/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/review-pr/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/save/SKILL.md +6 -4
- package/runtime/pi/.codex/skills/scroll/SKILL.md +92 -23
- package/runtime/pi/.codex/skills/scroll/assets/shell.html +381 -52
- package/runtime/pi/.codex/skills/session-view/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/setup/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/summon/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/sync-repos/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/task/SKILL.md +9 -5
- package/runtime/pi/.codex/skills/teams-connect/SKILL.md +29 -0
- package/runtime/pi/.codex/skills/telegram-connect/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/telemetry/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/test/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/thread/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/todo/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/tui-design/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/tutorial/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/update/SKILL.md +8 -4
- package/runtime/pi/.codex/skills/visual-explain/SKILL.md +8 -4
- package/runtime/pi/.codex/spec-manifest.json +4 -4
- package/runtime/pi/.pi/APPEND_SYSTEM.md +34 -12
- package/runtime/pi/.pi/extensions/egregore.ts +8 -1
- package/runtime/pi/.pi/spec-manifest.json +2 -2
- package/runtime/pi/AGENTS.md +36 -14
- package/runtime/pi/bin/activity-data.sh +1 -1
- package/runtime/pi/bin/agent.sh +38 -19
- package/runtime/pi/bin/attendant.sh +8 -2
- package/runtime/pi/bin/autosave.sh +1 -1
- package/runtime/pi/bin/capture-reconcile.sh +8 -6
- package/runtime/pi/bin/capture-run.sh +1 -1
- package/runtime/pi/bin/codex-install-skills.sh +1 -1
- package/runtime/pi/bin/codex-render-spec.mjs +12 -5
- package/runtime/pi/bin/codex-session-start.sh +1 -1
- package/runtime/pi/bin/codex-skill-render.mjs +5 -0
- package/runtime/pi/bin/codex-sync-skills.sh +9 -5
- package/runtime/pi/bin/dashboard-data.sh +1 -1
- package/runtime/pi/bin/graph-batch.sh +1 -1
- package/runtime/pi/bin/graph-op.sh +1 -1
- package/runtime/pi/bin/graph-wal.sh +1 -1
- package/runtime/pi/bin/graph.sh +1 -1
- package/runtime/pi/bin/handoff-pr-backfill.sh +1 -1
- package/runtime/pi/bin/handoff-run.sh +117 -119
- package/runtime/pi/bin/handoff-save-egregore.sh +62 -32
- package/runtime/pi/bin/index-handoff.sh +3 -2
- package/runtime/pi/bin/ingest-graph.sh +1 -1
- package/runtime/pi/bin/ingest.sh +1 -1
- package/runtime/pi/bin/lib/artifact-id.sh +1 -1
- package/runtime/pi/bin/lib/config.sh +56 -20
- package/runtime/pi/bin/lib/context.sh +7 -1
- package/runtime/pi/bin/lib/ensure-develop.sh +1 -1
- package/runtime/pi/bin/lib/git-sync.sh +145 -59
- package/runtime/pi/bin/lib/greeting.sh +14 -0
- package/runtime/pi/bin/lib/hash.sh +1 -1
- package/runtime/pi/bin/lib/noncode.sh +1 -1
- package/runtime/pi/bin/lib/time.sh +1 -1
- package/runtime/pi/bin/notify.sh +492 -153
- package/runtime/pi/bin/person.sh +1 -1
- package/runtime/pi/bin/pi-product-workflows.mjs +14 -5
- package/runtime/pi/bin/pi-session-start.sh +1 -1
- package/runtime/pi/bin/publish-artifact.sh +64 -8
- package/runtime/pi/bin/publish-references.sh +1 -1
- package/runtime/pi/bin/repo-state.sh +7 -10
- package/runtime/pi/bin/search.sh +1 -1
- package/runtime/pi/bin/session-autosave.sh +1 -1
- package/runtime/pi/bin/session-log.sh +1 -1
- package/runtime/pi/bin/settings.sh +32 -2
- package/runtime/pi/bin/telemetry.sh +1 -1
- package/runtime/pi/bin/worktree-create.sh +14 -4
- package/runtime/pi/bin/worktree-remove.sh +1 -1
- package/runtime/pi/bin/worktree.sh +1 -1
- package/runtime/pi/manifest.json +18 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: task
|
|
3
|
-
description: 'Create, import, inspect, approve, answer, or cancel work in the hosted Egregore Agent Desk. Use for `/task`, `$task`, “send this work to the agents,” “start these tasks,” Markdown development batches, or checking hosted task progress. This skill submits work to the hosted pipeline; it does not implement the task in the current local session.'
|
|
3
|
+
description: 'Create, import, inspect, approve, answer, retry, complete, or cancel work in the hosted Egregore Agent Desk. Use for `/task`, `$task`, “send this work to the agents,” “start these tasks,” Markdown development batches, or checking hosted task progress. This skill submits work to the hosted pipeline; it does not implement the task in the current local session.'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
<!-- generated-by: bin/codex-sync-skills.sh -->
|
|
@@ -17,9 +17,13 @@ when it is available; otherwise render compact numbered choices with an
|
|
|
17
17
|
|
|
18
18
|
1. Read `.claude/skills/task/SKILL.md` for the workflow details.
|
|
19
19
|
2. Run the referenced `bin/` scripts directly from Codex.
|
|
20
|
-
3. Treat graph
|
|
21
|
-
|
|
22
|
-
4.
|
|
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
|
|
23
27
|
calls when `egregore.json` declares `"mode": "local"`.
|
|
24
|
-
|
|
28
|
+
6. Never call the deprecated `egregore-handoff` CLI for Egregore project
|
|
25
29
|
handoffs.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: teams-connect
|
|
3
|
+
description: 'Fallback Codex adapter for the Egregore teams-connect workflow.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- generated-by: bin/codex-sync-skills.sh -->
|
|
7
|
+
|
|
8
|
+
# Egregore teams-connect 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/teams-connect/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.
|
|
@@ -17,9 +17,13 @@ when it is available; otherwise render compact numbered choices with an
|
|
|
17
17
|
|
|
18
18
|
1. Read `.claude/skills/telegram-connect/SKILL.md` for the workflow details.
|
|
19
19
|
2. Run the referenced `bin/` scripts directly from Codex.
|
|
20
|
-
3. Treat graph
|
|
21
|
-
|
|
22
|
-
4.
|
|
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
|
|
23
27
|
calls when `egregore.json` declares `"mode": "local"`.
|
|
24
|
-
|
|
28
|
+
6. Never call the deprecated `egregore-handoff` CLI for Egregore project
|
|
25
29
|
handoffs.
|
|
@@ -17,9 +17,13 @@ when it is available; otherwise render compact numbered choices with an
|
|
|
17
17
|
|
|
18
18
|
1. Read `.claude/skills/telemetry/SKILL.md` for the workflow details.
|
|
19
19
|
2. Run the referenced `bin/` scripts directly from Codex.
|
|
20
|
-
3. Treat graph
|
|
21
|
-
|
|
22
|
-
4.
|
|
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
|
|
23
27
|
calls when `egregore.json` declares `"mode": "local"`.
|
|
24
|
-
|
|
28
|
+
6. Never call the deprecated `egregore-handoff` CLI for Egregore project
|
|
25
29
|
handoffs.
|
|
@@ -33,9 +33,13 @@ reading `.claude/skills/test/SKILL.md`, reproduce the same visible UX in Codex:
|
|
|
33
33
|
|
|
34
34
|
1. Read `.claude/skills/test/SKILL.md` for the workflow details.
|
|
35
35
|
2. Run the referenced `bin/` scripts directly from Codex.
|
|
36
|
-
3. Treat graph
|
|
37
|
-
|
|
38
|
-
4.
|
|
36
|
+
3. Treat graph and publish steps as best-effort unless that workflow explicitly
|
|
37
|
+
says they are required.
|
|
38
|
+
4. For every external notification, follow
|
|
39
|
+
`.claude/context/notification-consent.md`: plan without sending, then show
|
|
40
|
+
a separate exact Send / Edit / Cancel checkpoint. Never infer notification
|
|
41
|
+
consent from the workflow request or a batch approval.
|
|
42
|
+
5. Keep local-mode behavior filesystem-first and avoid graph or notification
|
|
39
43
|
calls when `egregore.json` declares `"mode": "local"`.
|
|
40
|
-
|
|
44
|
+
6. Never call the deprecated `egregore-handoff` CLI for Egregore project
|
|
41
45
|
handoffs.
|
|
@@ -17,9 +17,13 @@ when it is available; otherwise render compact numbered choices with an
|
|
|
17
17
|
|
|
18
18
|
1. Read `.claude/skills/thread/SKILL.md` for the workflow details.
|
|
19
19
|
2. Run the referenced `bin/` scripts directly from Codex.
|
|
20
|
-
3. Treat graph
|
|
21
|
-
|
|
22
|
-
4.
|
|
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
|
|
23
27
|
calls when `egregore.json` declares `"mode": "local"`.
|
|
24
|
-
|
|
28
|
+
6. Never call the deprecated `egregore-handoff` CLI for Egregore project
|
|
25
29
|
handoffs.
|
|
@@ -33,9 +33,13 @@ reading `.claude/skills/todo/SKILL.md`, reproduce the same visible UX in Codex:
|
|
|
33
33
|
|
|
34
34
|
1. Read `.claude/skills/todo/SKILL.md` for the workflow details.
|
|
35
35
|
2. Run the referenced `bin/` scripts directly from Codex.
|
|
36
|
-
3. Treat graph
|
|
37
|
-
|
|
38
|
-
4.
|
|
36
|
+
3. Treat graph and publish steps as best-effort unless that workflow explicitly
|
|
37
|
+
says they are required.
|
|
38
|
+
4. For every external notification, follow
|
|
39
|
+
`.claude/context/notification-consent.md`: plan without sending, then show
|
|
40
|
+
a separate exact Send / Edit / Cancel checkpoint. Never infer notification
|
|
41
|
+
consent from the workflow request or a batch approval.
|
|
42
|
+
5. Keep local-mode behavior filesystem-first and avoid graph or notification
|
|
39
43
|
calls when `egregore.json` declares `"mode": "local"`.
|
|
40
|
-
|
|
44
|
+
6. Never call the deprecated `egregore-handoff` CLI for Egregore project
|
|
41
45
|
handoffs.
|
|
@@ -33,9 +33,13 @@ reading `.claude/skills/tui-design/SKILL.md`, reproduce the same visible UX in C
|
|
|
33
33
|
|
|
34
34
|
1. Read `.claude/skills/tui-design/SKILL.md` for the workflow details.
|
|
35
35
|
2. Run the referenced `bin/` scripts directly from Codex.
|
|
36
|
-
3. Treat graph
|
|
37
|
-
|
|
38
|
-
4.
|
|
36
|
+
3. Treat graph and publish steps as best-effort unless that workflow explicitly
|
|
37
|
+
says they are required.
|
|
38
|
+
4. For every external notification, follow
|
|
39
|
+
`.claude/context/notification-consent.md`: plan without sending, then show
|
|
40
|
+
a separate exact Send / Edit / Cancel checkpoint. Never infer notification
|
|
41
|
+
consent from the workflow request or a batch approval.
|
|
42
|
+
5. Keep local-mode behavior filesystem-first and avoid graph or notification
|
|
39
43
|
calls when `egregore.json` declares `"mode": "local"`.
|
|
40
|
-
|
|
44
|
+
6. Never call the deprecated `egregore-handoff` CLI for Egregore project
|
|
41
45
|
handoffs.
|
|
@@ -33,9 +33,13 @@ reading `.claude/skills/tutorial/SKILL.md`, reproduce the same visible UX in Cod
|
|
|
33
33
|
|
|
34
34
|
1. Read `.claude/skills/tutorial/SKILL.md` for the workflow details.
|
|
35
35
|
2. Run the referenced `bin/` scripts directly from Codex.
|
|
36
|
-
3. Treat graph
|
|
37
|
-
|
|
38
|
-
4.
|
|
36
|
+
3. Treat graph and publish steps as best-effort unless that workflow explicitly
|
|
37
|
+
says they are required.
|
|
38
|
+
4. For every external notification, follow
|
|
39
|
+
`.claude/context/notification-consent.md`: plan without sending, then show
|
|
40
|
+
a separate exact Send / Edit / Cancel checkpoint. Never infer notification
|
|
41
|
+
consent from the workflow request or a batch approval.
|
|
42
|
+
5. Keep local-mode behavior filesystem-first and avoid graph or notification
|
|
39
43
|
calls when `egregore.json` declares `"mode": "local"`.
|
|
40
|
-
|
|
44
|
+
6. Never call the deprecated `egregore-handoff` CLI for Egregore project
|
|
41
45
|
handoffs.
|
|
@@ -17,9 +17,13 @@ when it is available; otherwise render compact numbered choices with an
|
|
|
17
17
|
|
|
18
18
|
1. Read `.claude/skills/update/SKILL.md` for the workflow details.
|
|
19
19
|
2. Run the referenced `bin/` scripts directly from Codex.
|
|
20
|
-
3. Treat graph
|
|
21
|
-
|
|
22
|
-
4.
|
|
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
|
|
23
27
|
calls when `egregore.json` declares `"mode": "local"`.
|
|
24
|
-
|
|
28
|
+
6. Never call the deprecated `egregore-handoff` CLI for Egregore project
|
|
25
29
|
handoffs.
|
|
@@ -33,9 +33,13 @@ reading `.claude/skills/visual-explain/SKILL.md`, reproduce the same visible UX
|
|
|
33
33
|
|
|
34
34
|
1. Read `.claude/skills/visual-explain/SKILL.md` for the workflow details.
|
|
35
35
|
2. Run the referenced `bin/` scripts directly from Codex.
|
|
36
|
-
3. Treat graph
|
|
37
|
-
|
|
38
|
-
4.
|
|
36
|
+
3. Treat graph and publish steps as best-effort unless that workflow explicitly
|
|
37
|
+
says they are required.
|
|
38
|
+
4. For every external notification, follow
|
|
39
|
+
`.claude/context/notification-consent.md`: plan without sending, then show
|
|
40
|
+
a separate exact Send / Edit / Cancel checkpoint. Never infer notification
|
|
41
|
+
consent from the workflow request or a batch approval.
|
|
42
|
+
5. Keep local-mode behavior filesystem-first and avoid graph or notification
|
|
39
43
|
calls when `egregore.json` declares `"mode": "local"`.
|
|
40
|
-
|
|
44
|
+
6. Never call the deprecated `egregore-handoff` CLI for Egregore project
|
|
41
45
|
handoffs.
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
{
|
|
36
36
|
"section": "After Greeting — BRANCH ON FIRST RESPONSE",
|
|
37
37
|
"action": "replace",
|
|
38
|
-
"sourceHash": "
|
|
38
|
+
"sourceHash": "f3bce52b9ade",
|
|
39
39
|
"note": "EnterWorktree -> bin/agent.sh branch with git checkout fallback; AskUserQuestion -> numbered options in plain text; branch-guard mapped to .codex/hooks/branch-guard.js with instruction fallback; plan-mode note dropped (no plan mode on Codex); /branch + /onboarding -> skill tokens. Handoff claiming and repoState auto-checkout kept verbatim (pure git)."
|
|
40
40
|
},
|
|
41
41
|
{
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
{
|
|
60
60
|
"section": "Notifications",
|
|
61
61
|
"action": "keep",
|
|
62
|
-
"sourceHash": "
|
|
62
|
+
"sourceHash": "1649d6eebb96",
|
|
63
63
|
"note": "Kept verbatim — bin/notify.sh is runtime-neutral."
|
|
64
64
|
},
|
|
65
65
|
{
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
{
|
|
90
90
|
"section": "Git Workflow",
|
|
91
91
|
"action": "keep",
|
|
92
|
-
"sourceHash": "
|
|
92
|
+
"sourceHash": "fe3d9dabd03d",
|
|
93
93
|
"note": "Kept; slash tokens rendered as $skill tokens. Branch diagram unchanged (code fence)."
|
|
94
94
|
},
|
|
95
95
|
{
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
{
|
|
102
102
|
"section": "Command Awareness",
|
|
103
103
|
"action": "keep",
|
|
104
|
-
"sourceHash": "
|
|
104
|
+
"sourceHash": "d6fe47a75c00",
|
|
105
105
|
"note": "Prepended the Codex command surface (skill tokens, native vs adapter split, $save abstraction); disambiguation map kept with /x -> $x token rendering. Tokens with no Codex skill (e.g. /loop, a Claude Code harness feature) are left as-is."
|
|
106
106
|
},
|
|
107
107
|
{
|
package/runtime/codex/AGENTS.md
CHANGED
|
@@ -125,11 +125,18 @@ The `egregore` launcher renders the Egregore startup card (identity, team moment
|
|
|
125
125
|
|
|
126
126
|
**Mandatory behavioral rule.** When the user describes work, your **first action** — before reading files, exploring code, or anything else — is to get onto a working branch:
|
|
127
127
|
|
|
128
|
+
The integration branch is `develop` by default. When top-level
|
|
129
|
+
`egregore.json.base_branch` is set, that configured branch replaces
|
|
130
|
+
`develop` as the branch point, rebase target, PR base, and protected
|
|
131
|
+
integration branch.
|
|
132
|
+
|
|
128
133
|
1. Derive a topic slug from what the user said (kebab-case, 2–4 words)
|
|
129
|
-
2. Run `bin/agent.sh branch --topic "<topic>"` — it creates a work branch from `origin/
|
|
134
|
+
2. Run `bin/agent.sh branch --topic "<topic>"` — it resolves the configured base and creates a work branch from `origin/{base}` in a task worktree (`dev/{author}/{slug}`, or `feature/{slug}` / `bugfix/{slug}` when the topic reads as a feature or fix). Continue all file work from the printed path.
|
|
130
135
|
3. Confirm: `On {branch} (worktree).`
|
|
131
136
|
|
|
132
|
-
**Fallback:** If `bin/agent.sh branch` fails,
|
|
137
|
+
**Fallback:** If `bin/agent.sh branch` fails, resolve `{base}` with
|
|
138
|
+
`_get_base_branch`, then use
|
|
139
|
+
`git checkout -b dev/{author}/{slug} origin/{base}`.
|
|
133
140
|
|
|
134
141
|
4. Update graph (fire-and-forget): `bash bin/graph-op.sh set-topic "$(cat .egregore-session-id 2>/dev/null)" "topic from slug" "dev/author/slug" 2>/dev/null &`
|
|
135
142
|
|
|
@@ -161,11 +168,11 @@ Report results: `✓ Checked out {branch} in {repo1}, {repo2}`. If a branch no l
|
|
|
161
168
|
|
|
162
169
|
**Topic pivot while on a working branch:** If the user describes work **unrelated** to the current branch's topic, treat it as a new topic and create a new branch (`bin/agent.sh branch --topic "<new topic>"`). Do NOT mix unrelated work on one branch.
|
|
163
170
|
|
|
164
|
-
If on
|
|
171
|
+
If still on the configured base branch after two messages, create a branch immediately from whatever context you have.
|
|
165
172
|
|
|
166
173
|
### Branch-guard protocol
|
|
167
174
|
|
|
168
|
-
The `.codex/hooks/branch-guard.js` PreToolUse hook (enabled by the launcher via `--enable hooks`) protects project writes on `develop`/`main`/`master`. Its block message is operational guidance, not a reason to interrupt the user with routine Git choices:
|
|
175
|
+
The `.codex/hooks/branch-guard.js` PreToolUse hook (enabled by the launcher via `--enable hooks`) protects project writes on the configured base branch as well as `develop`/`main`/`master`. Its block message is operational guidance, not a reason to interrupt the user with routine Git choices:
|
|
169
176
|
|
|
170
177
|
- **Topic is clear** (the user said "fix X", "add Y feature") → run `bin/agent.sh branch --topic "<topic>"` automatically, continue in the printed worktree, and say one short sentence so the branch change is visible. Do not ask the user to approve routine branching.
|
|
171
178
|
- **Topic is genuinely ambiguous** → ask only for the topic, using compact numbered options:
|
|
@@ -182,7 +189,7 @@ The `.codex/hooks/branch-guard.js` PreToolUse hook (enabled by the launcher via
|
|
|
182
189
|
|
|
183
190
|
Memory, managed-repo, and runtime-state writes should bypass the project guard. If one triggers it, correct the operation target/context instead of asking for protected-branch consent.
|
|
184
191
|
|
|
185
|
-
If this Codex build does not support hooks, follow the same discipline as a standing instruction: never write or commit on develop
|
|
192
|
+
If this Codex build does not support hooks, follow the same discipline as a standing instruction: never write or commit on the configured base, develop, main, or master.
|
|
186
193
|
|
|
187
194
|
### Onboarding exception
|
|
188
195
|
|
|
@@ -269,7 +276,19 @@ Never name `Egregore Connect` unless a graph read will actually run.
|
|
|
269
276
|
|
|
270
277
|
## Notifications
|
|
271
278
|
|
|
272
|
-
**Connected mode only.**
|
|
279
|
+
**Connected mode only.** Every external notification requires a separate,
|
|
280
|
+
explicit human approval for one exact delivery. Before dispatch, show the
|
|
281
|
+
organization, final recipient or group, every receiving channel, and the exact
|
|
282
|
+
final message (including links) in a dedicated Send / Edit / Cancel checkpoint.
|
|
283
|
+
A workflow request, batch approval, prior approval, broad permission mode, or
|
|
284
|
+
approval of another action is not notification consent. There is no standing
|
|
285
|
+
approval, no unattended dispatch, no silent direct-message-to-group fallback,
|
|
286
|
+
and no retry from an old approval.
|
|
287
|
+
|
|
288
|
+
Always use the plan → approve → dispatch protocol in
|
|
289
|
+
`.claude/context/notification-consent.md` and `bin/notify.sh`; never call
|
|
290
|
+
notification API endpoints directly. Background jobs and automation may only
|
|
291
|
+
create notification proposals for later human approval.
|
|
273
292
|
|
|
274
293
|
---
|
|
275
294
|
|
|
@@ -312,7 +331,10 @@ Loom routes commands across model tiers on the Claude Code runtime (`loom/routes
|
|
|
312
331
|
|
|
313
332
|
## Git Workflow
|
|
314
333
|
|
|
315
|
-
`develop`
|
|
334
|
+
`develop` is the default integration branch. A top-level
|
|
335
|
+
`egregore.json.base_branch` replaces it for instances using another integration
|
|
336
|
+
branch; `base_branch: "main"` is single-branch mode. Users never interact with
|
|
337
|
+
git directly.
|
|
316
338
|
|
|
317
339
|
```
|
|
318
340
|
main ← stable (/release)
|
|
@@ -320,13 +342,13 @@ main ← stable (/release)
|
|
|
320
342
|
dev/{author}/{topic-slug} | feature/{slug} | bugfix/{slug}
|
|
321
343
|
```
|
|
322
344
|
|
|
323
|
-
- **On launch**: syncs
|
|
345
|
+
- **On launch**: syncs the configured base branch + memory. Does NOT create a branch.
|
|
324
346
|
- **Branch creation**: MANDATORY on first work-related message (see above).
|
|
325
|
-
- **Resuming**: rebase onto
|
|
326
|
-
- **If on
|
|
327
|
-
- **`$save`**: pushes working branch
|
|
347
|
+
- **Resuming**: rebase onto the configured base branch and continue.
|
|
348
|
+
- **If on the configured base after two messages**: create branch immediately.
|
|
349
|
+
- **`$save`**: pushes the working branch and opens a PR to the configured base. Auto-merges markdown-only PRs.
|
|
328
350
|
- **Memory repo**: stays on main (separate repo, auto-merge).
|
|
329
|
-
- **Never push directly to main or develop.** All changes flow through PRs.
|
|
351
|
+
- **Never push directly to the configured base, main, or develop.** All changes flow through PRs.
|
|
330
352
|
|
|
331
353
|
### Pull request format (all harnesses)
|
|
332
354
|
|
|
@@ -353,7 +375,7 @@ Codex reserves leading `/` for built-ins, so Egregore workflows are **skills**,
|
|
|
353
375
|
Invoke commands from user intent — don't wait for the slash. Each command file has a `## When to invoke` section. Load it for the full spec.
|
|
354
376
|
|
|
355
377
|
**Core loop** — `$activity` `$dashboard` `$handoff` `$wrap` `$save` `$reflect` `$todo`
|
|
356
|
-
**Knowledge** — `$search` `$deep-reflect` `$archive` `$note` `$add` `$meeting` `$ingest` `$scroll` `$mock`
|
|
378
|
+
**Knowledge** — `$search` `$deep-reflect` `$archive` `$note` `$add` `$meeting` `$ingest` `$scroll` `$mock` `$audit`
|
|
357
379
|
**Identity** — `$me` (view profile or set display name)
|
|
358
380
|
**Coordination** — `$ask` `$quest` `$issue` `$invite` `$delete-user` `$announce`
|
|
359
381
|
**Connectors** — `$telegram-connect` (Telegram group setup) `$teams-connect` (Microsoft Teams channel setup)
|
|
@@ -362,7 +384,7 @@ Invoke commands from user intent — don't wait for the slash. Each command file
|
|
|
362
384
|
**Infra** — `$setup` `$update` `$pull` `$env` `$infra` `$sync-repos` `$release` `$checkup`
|
|
363
385
|
|
|
364
386
|
**Disambiguation:**
|
|
365
|
-
- Knowledge: `$reflect` (share-ready) · `$note` (half-baked) · `$deep-reflect` (deep research over memory — questions AND cross-referencing) · `$archive` (AI patterns)
|
|
387
|
+
- Knowledge: `$reflect` (share-ready) · `$note` (half-baked) · `$deep-reflect` (deep research over memory — questions AND cross-referencing) · `$archive` (AI patterns) · `$audit` (evidence-mined forensic sweep of the org's own record — any target)
|
|
366
388
|
- Finding things — **organizational recall starts with `bash bin/search.sh query`** (ranked filesystem retrieval in OSS; automatic relationship/status enrichment in Connect). Use `bin/graph.sh` named reads first only for a pure relationship/status traversal. Use Grep/Glob first for repository code, filenames, and exact error strings—not shared-memory recall. Do not `cd` into the sibling memory repository.
|
|
367
389
|
- Finding **something you generated** (a scroll, handoff, emissary, decision, any hosted egregore.xyz link): `bash bin/artifacts.sh find <query>`. Every generative surface already records into memory — hosted artifacts self-register into `memory/artifacts/` at publish (and the record is committed+pushed, so it's findable from *any* session, not just the one that made it); handoffs land in `memory/handoffs/`, emissaries in `memory/handoffs/outbound/`, decisions/findings/patterns in `memory/knowledge/`. The finder searches **all** of them, ranks title/topic matches above passing body mentions, tags each hit by type (`[document]`/`[handoff]`/`[emissary]`/`[decision]`), and surfaces the shareable URL. Findable by **content, not just name**, across all three layers — grep-first for OSS, folding in search + graph when available. *"bring me the artifact where I laid out our GTM plan"* → this.
|
|
368
390
|
- Artifacts with questions: `$scroll` (living paper + embedded harvest, updates in place) · `$view` (static render) · `$harvest` (elicitation, no published face) · `$mock` (pre-build walkthrough of decided design — gauge per stop, verdict copy-back)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/bin/bash
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
2
|
# Runtime-neutral Egregore agent bridge.
|
|
3
3
|
#
|
|
4
4
|
# This script exposes the Git-backed memory protocol without requiring
|
|
@@ -19,6 +19,10 @@ if [ -f "$SCRIPT_DIR/bin/lib/worktree-links.sh" ]; then
|
|
|
19
19
|
fi
|
|
20
20
|
CONFIG="$SCRIPT_DIR/egregore.json"
|
|
21
21
|
MEMORY_DIR="${EGREGORE_MEMORY_DIR:-$SCRIPT_DIR/memory}"
|
|
22
|
+
if [ -f "$SCRIPT_DIR/bin/lib/config.sh" ]; then
|
|
23
|
+
# shellcheck source=bin/lib/config.sh
|
|
24
|
+
source "$SCRIPT_DIR/bin/lib/config.sh"
|
|
25
|
+
fi
|
|
22
26
|
|
|
23
27
|
usage() {
|
|
24
28
|
cat <<'EOF'
|
|
@@ -55,6 +59,15 @@ die() {
|
|
|
55
59
|
exit 1
|
|
56
60
|
}
|
|
57
61
|
|
|
62
|
+
resolve_base_branch() {
|
|
63
|
+
local base
|
|
64
|
+
if ! base=$(_get_base_branch); then
|
|
65
|
+
echo "agent.sh: could not resolve the configured base branch" >&2
|
|
66
|
+
return 1
|
|
67
|
+
fi
|
|
68
|
+
echo "$base"
|
|
69
|
+
}
|
|
70
|
+
|
|
58
71
|
slugify() {
|
|
59
72
|
echo "$1" \
|
|
60
73
|
| tr '[:upper:]' '[:lower:]' \
|
|
@@ -152,13 +165,16 @@ worktree_for_branch() {
|
|
|
152
165
|
}
|
|
153
166
|
|
|
154
167
|
base_ref() {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
echo "
|
|
168
|
+
local base
|
|
169
|
+
base="$(resolve_base_branch)" || return 1
|
|
170
|
+
git -C "$MAIN_PROJECT_DIR" fetch origin "$base" --quiet 2>/dev/null || true
|
|
171
|
+
if git -C "$MAIN_PROJECT_DIR" show-ref --verify --quiet "refs/remotes/origin/$base" 2>/dev/null; then
|
|
172
|
+
echo "origin/$base"
|
|
173
|
+
elif git -C "$MAIN_PROJECT_DIR" show-ref --verify --quiet "refs/heads/$base" 2>/dev/null; then
|
|
174
|
+
echo "$base"
|
|
160
175
|
else
|
|
161
|
-
echo "
|
|
176
|
+
echo "agent.sh: configured base branch '$base' does not exist locally or on origin" >&2
|
|
177
|
+
return 1
|
|
162
178
|
fi
|
|
163
179
|
}
|
|
164
180
|
|
|
@@ -275,7 +291,7 @@ cmd_branch() {
|
|
|
275
291
|
bugfix) branch="bugfix/${slug}" ;;
|
|
276
292
|
esac
|
|
277
293
|
|
|
278
|
-
base="$(base_ref)"
|
|
294
|
+
base="$(base_ref)" || die "could not find a safe branch point"
|
|
279
295
|
|
|
280
296
|
if [ -f "$SCRIPT_DIR/.git" ]; then
|
|
281
297
|
if git -C "$SCRIPT_DIR" show-ref --verify --quiet "refs/heads/$branch" 2>/dev/null; then
|
|
@@ -326,7 +342,7 @@ ensure_working_branch() {
|
|
|
326
342
|
slug="$(slugify "$topic")"
|
|
327
343
|
[ -n "$slug" ] || slug="$(date +%Y-%m-%d)"
|
|
328
344
|
branch="dev/${author}/${slug}"
|
|
329
|
-
base="$(base_ref)"
|
|
345
|
+
base="$(base_ref)" || die "could not find a safe branch point"
|
|
330
346
|
|
|
331
347
|
if git -C "$SCRIPT_DIR" show-ref --verify --quiet "refs/heads/$branch" 2>/dev/null; then
|
|
332
348
|
git -C "$SCRIPT_DIR" checkout "$branch" --quiet || die "failed to checkout $branch"
|
|
@@ -339,16 +355,17 @@ ensure_working_branch() {
|
|
|
339
355
|
build_pr_body() {
|
|
340
356
|
# Compliant fallback PR body (spec: .claude/context/pr-format.md) built
|
|
341
357
|
# from the commit log + diff when the calling agent supplies none.
|
|
342
|
-
local topic="${1:-portable save}" commits stat
|
|
343
|
-
|
|
358
|
+
local topic="${1:-portable save}" base commits stat
|
|
359
|
+
base="$(resolve_base_branch)" || return 1
|
|
360
|
+
commits="$(git -C "$SCRIPT_DIR" log --pretty='- %s' "origin/$base..HEAD" 2>/dev/null | head -8)"
|
|
344
361
|
[ -n "$commits" ] || commits="- (commit list unavailable — see the Files tab)"
|
|
345
|
-
stat="$(git -C "$SCRIPT_DIR" diff --shortstat "origin
|
|
362
|
+
stat="$(git -C "$SCRIPT_DIR" diff --shortstat "origin/$base...HEAD" 2>/dev/null | sed 's/^ *//')"
|
|
346
363
|
printf '## What\n%s\n\n## Why\nShell-agent session save — topic: %s. Body auto-generated by bin/agent.sh; pass --pr-body for a hand-written description.\n\n## Verification\nNot verified — auto-generated skeleton; review the diff before merging.%s\n\n🤖 Saved via bin/agent.sh\n' \
|
|
347
364
|
"$commits" "$topic" "${stat:+ ($stat)}"
|
|
348
365
|
}
|
|
349
366
|
|
|
350
367
|
cmd_save() {
|
|
351
|
-
local message="" topic="" no_pr=0 branch pushed="false" committed="false" pr_url="" existing_pr="" pr_number="" non_md="" merged="false" pr_body="" pr_body_file=""
|
|
368
|
+
local message="" topic="" no_pr=0 branch base pushed="false" committed="false" pr_url="" existing_pr="" pr_number="" non_md="" merged="false" pr_body="" pr_body_file=""
|
|
352
369
|
|
|
353
370
|
while [ $# -gt 0 ]; do
|
|
354
371
|
case "$1" in
|
|
@@ -363,6 +380,7 @@ cmd_save() {
|
|
|
363
380
|
|
|
364
381
|
[ -n "$topic" ] || topic="portable save"
|
|
365
382
|
[ -n "$message" ] || message="Save: $topic"
|
|
383
|
+
base="$(resolve_base_branch)" || die "save stopped before Git changes"
|
|
366
384
|
|
|
367
385
|
if [ -d "$MEMORY_DIR" ]; then
|
|
368
386
|
save_memory "$message" "."
|
|
@@ -397,11 +415,11 @@ cmd_save() {
|
|
|
397
415
|
pr_body="$(cat "$pr_body_file")"
|
|
398
416
|
fi
|
|
399
417
|
[ -n "$pr_body" ] || pr_body="$(build_pr_body "$topic")"
|
|
400
|
-
pr_url="$(gh pr create --base
|
|
418
|
+
pr_url="$(gh pr create --base "$base" --head "$branch" --title "$message" --body "$pr_body" 2>/dev/null || true)"
|
|
401
419
|
fi
|
|
402
420
|
fi
|
|
403
421
|
|
|
404
|
-
# Non-coding saves auto-merge to
|
|
422
|
+
# Non-coding saves auto-merge to the configured base (same rule as /save and the
|
|
405
423
|
# handoff helper; policy in bin/lib/noncode.sh). `--auto` needs repo
|
|
406
424
|
# auto-merge + pending required checks; without branch protection it always
|
|
407
425
|
# errors, so fall back to a direct merge.
|
|
@@ -409,10 +427,10 @@ cmd_save() {
|
|
|
409
427
|
# shellcheck source=bin/lib/noncode.sh
|
|
410
428
|
. "$SCRIPT_DIR/bin/lib/noncode.sh" 2>/dev/null || true
|
|
411
429
|
type noncode_blockers >/dev/null 2>&1 || noncode_blockers() {
|
|
412
|
-
git -C "${2:-.}" diff "${1:-origin
|
|
430
|
+
git -C "${2:-.}" diff "${1:-origin/$base}...HEAD" --name-only 2>/dev/null | grep -v '\.md$' | head -1 || true
|
|
413
431
|
}
|
|
414
432
|
pr_number="${pr_url##*/}"
|
|
415
|
-
non_code="$(noncode_blockers origin
|
|
433
|
+
non_code="$(noncode_blockers "origin/$base" "$SCRIPT_DIR")"
|
|
416
434
|
if [ -z "$non_code" ] && [ -n "$pr_number" ]; then
|
|
417
435
|
if gh pr merge "$pr_number" --auto --merge >/dev/null 2>&1 \
|
|
418
436
|
|| gh pr merge "$pr_number" --merge >/dev/null 2>&1; then
|
|
@@ -425,7 +443,7 @@ cmd_save() {
|
|
|
425
443
|
echo "commit: $committed"
|
|
426
444
|
echo "push: $pushed"
|
|
427
445
|
[ -n "$pr_url" ] && echo "pr: $pr_url"
|
|
428
|
-
[ "$merged" = "true" ] && echo "merge: non-coding, merged to
|
|
446
|
+
[ "$merged" = "true" ] && echo "merge: non-coding, merged to $base"
|
|
429
447
|
return 0
|
|
430
448
|
}
|
|
431
449
|
|
|
@@ -569,7 +587,8 @@ cmd_handoff() {
|
|
|
569
587
|
echo "result: $result_out"
|
|
570
588
|
|
|
571
589
|
# Parity with the Claude /handoff skill: save core-repo session work in the
|
|
572
|
-
# background (non-coding diffs auto-merge to
|
|
590
|
+
# background (non-coding diffs auto-merge to the configured base; code stays
|
|
591
|
+
# in a PR).
|
|
573
592
|
if [ "$NO_PUSH" = "0" ]; then
|
|
574
593
|
( bash "$SCRIPT_DIR/bin/handoff-save-egregore.sh" "$from" "$topic" --repo-dir "$SCRIPT_DIR" >/dev/null 2>&1 & ) >/dev/null 2>&1
|
|
575
594
|
fi
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/bin/bash
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
2
|
# The attendant — Egregore's ambient listener. A per-instance daemon that
|
|
3
3
|
# watches for work Claude Code sessions leave behind when they die without
|
|
4
4
|
# ceremony (terminal closed, laptop shut) and captures it:
|
|
@@ -426,7 +426,13 @@ LIFECYCLE_MARKER="$STATE_DIR/$KEY.handoff-lifecycle-ts"
|
|
|
426
426
|
|
|
427
427
|
_handoff_lifecycle() {
|
|
428
428
|
local now last mode api_url api_key result
|
|
429
|
-
|
|
429
|
+
# Read the raw value, not `// true` — jq's `//` returns its right-hand side
|
|
430
|
+
# for null *and false*, so `{"features":{"handoff_lifecycle":false}}` used to
|
|
431
|
+
# resolve to "true" and the opt-out did nothing. Absent key still means on.
|
|
432
|
+
case "$(jq -r '.features.handoff_lifecycle | tojson' "$CONFIG" 2>/dev/null)" in
|
|
433
|
+
null|true) ;;
|
|
434
|
+
*) return 0 ;;
|
|
435
|
+
esac
|
|
430
436
|
[ -f "$MAIN_DIR/bin/handoff-lifecycle-job.sh" ] || return 0
|
|
431
437
|
|
|
432
438
|
mode=$(jq -r '.mode // "connected"' "$CONFIG" 2>/dev/null)
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
#!/bin/bash
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
2
|
set -euo pipefail
|
|
3
3
|
|
|
4
4
|
# Detached reconciliation worker for explicit captures.
|
|
5
5
|
# The foreground path only appends to graph-wal.sh; this worker pays network
|
|
6
|
-
# latency
|
|
6
|
+
# latency and retries queued writes. It may propose completion notifications,
|
|
7
|
+
# but detached reconciliation never approves or dispatches them.
|
|
7
8
|
|
|
8
9
|
SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
|
9
10
|
MODE="$(jq -r '.mode // "connected"' "$SCRIPT_DIR/egregore.json" 2>/dev/null || echo connected)"
|
|
@@ -32,6 +33,7 @@ CLAIM_CYPHER='
|
|
|
32
33
|
MATCH (impl:Session {id: $sessionId})-[r:IMPLEMENTS]->(ho:Session)-[:BY]->(origin:Person)
|
|
33
34
|
WHERE ho.handoffStatus = "done"
|
|
34
35
|
AND r.completionNotifiedAt IS NULL
|
|
36
|
+
AND r.completionNotifyProposedAt IS NULL
|
|
35
37
|
AND (r.completionNotifyClaimedAt IS NULL
|
|
36
38
|
OR r.completionNotifyClaimedAt < datetime() - duration("PT1H"))
|
|
37
39
|
SET r.completionNotifyClaimedAt = datetime()
|
|
@@ -46,11 +48,11 @@ while IFS=$'\t' read -r handoff_id topic recipient; do
|
|
|
46
48
|
message="${AUTHOR:-A teammate} completed your handoff '${topic:-$handoff_id}'"
|
|
47
49
|
[ -n "$SUMMARY" ] && message="${message} — $(printf '%s' "$SUMMARY" | tr '\n' ' ' | cut -c1-180)"
|
|
48
50
|
|
|
49
|
-
notify_result="$(bash "$SCRIPT_DIR/bin/notify.sh" send "$recipient" "$message" 2>/dev/null || echo
|
|
50
|
-
if printf '%s' "$notify_result" |
|
|
51
|
+
notify_result="$(bash "$SCRIPT_DIR/bin/notify.sh" plan send "$recipient" "$message" 2>/dev/null || echo '{}')"
|
|
52
|
+
if printf '%s' "$notify_result" | jq -e '.status == "approval_required"' >/dev/null 2>&1; then
|
|
51
53
|
bash "$SCRIPT_DIR/bin/graph.sh" query '
|
|
52
54
|
MATCH (impl:Session {id: $sessionId})-[r:IMPLEMENTS]->(ho:Session {id: $handoffId})
|
|
53
|
-
SET r.
|
|
55
|
+
SET r.completionNotifyProposedAt = datetime(),
|
|
54
56
|
r.completionNotifyClaimedAt = null
|
|
55
57
|
RETURN ho.id AS id
|
|
56
58
|
' "$(jq -nc --arg sessionId "$SESSION_ID" --arg handoffId "$handoff_id" \
|
|
@@ -59,7 +61,7 @@ while IFS=$'\t' read -r handoff_id topic recipient; do
|
|
|
59
61
|
bash "$SCRIPT_DIR/bin/graph.sh" query '
|
|
60
62
|
MATCH (impl:Session {id: $sessionId})-[r:IMPLEMENTS]->(ho:Session {id: $handoffId})
|
|
61
63
|
SET r.completionNotifyClaimedAt = null,
|
|
62
|
-
r.
|
|
64
|
+
r.completionNotifyProposalFailedAt = datetime()
|
|
63
65
|
RETURN ho.id AS id
|
|
64
66
|
' "$(jq -nc --arg sessionId "$SESSION_ID" --arg handoffId "$handoff_id" \
|
|
65
67
|
'{sessionId:$sessionId,handoffId:$handoffId}')" >/dev/null 2>&1 || true
|