create-egregore 0.19.33 → 0.20.1
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 +141 -14
- package/bin/cli.js +19 -3
- package/lib/connect-runtime.js +4 -2
- package/lib/local.js +15 -1
- package/lib/prime-runtime.js +208 -0
- package/lib/setup.js +66 -5
- package/package.json +4 -3
- package/runtime/codex/.codex/config.toml +3 -0
- package/runtime/codex/.codex/skills/archive/SKILL.md +1 -1
- package/runtime/codex/.codex/skills/branch/SKILL.md +1 -1
- package/runtime/codex/.codex/skills/checkup/SKILL.md +1 -1
- package/runtime/codex/.codex/skills/commit/SKILL.md +1 -1
- package/runtime/codex/.codex/skills/contribute/SKILL.md +1 -1
- package/runtime/codex/.codex/skills/delete-user/SKILL.md +1 -1
- package/runtime/codex/.codex/skills/ingest/SKILL.md +1 -1
- package/runtime/codex/.codex/skills/ingest-corpus/SKILL.md +29 -0
- package/runtime/codex/.codex/skills/ingest-notion/SKILL.md +29 -0
- package/runtime/codex/.codex/skills/ingest-user-interview/SKILL.md +1 -1
- package/runtime/codex/.codex/skills/issue/SKILL.md +1 -1
- package/runtime/codex/.codex/skills/me/SKILL.md +1 -1
- package/runtime/codex/.codex/skills/meeting/SKILL.md +1 -1
- package/runtime/codex/.codex/skills/note/SKILL.md +1 -1
- package/runtime/codex/.codex/skills/notion-connect/SKILL.md +29 -0
- package/runtime/codex/.codex/skills/onboarding/SKILL.md +1 -1
- package/runtime/codex/.codex/skills/pr/SKILL.md +1 -1
- package/runtime/codex/.codex/skills/pull/SKILL.md +1 -1
- package/runtime/codex/.codex/skills/push/SKILL.md +1 -1
- package/runtime/codex/.codex/skills/reflect/SKILL.md +1 -1
- package/runtime/codex/.codex/skills/review-pr/SKILL.md +1 -1
- package/runtime/codex/.codex/skills/save/SKILL.md +3 -1
- package/runtime/codex/.codex/skills/slack-connect/SKILL.md +1 -1
- package/runtime/codex/.codex/skills/summon/SKILL.md +1 -1
- package/runtime/codex/.codex/skills/sync-repos/SKILL.md +1 -1
- package/runtime/codex/.codex/skills/teams-connect/SKILL.md +29 -0
- package/runtime/codex/.codex/skills/telegram-connect/SKILL.md +1 -1
- package/runtime/codex/.codex/skills/telemetry/SKILL.md +1 -1
- package/runtime/codex/.codex/skills/test/SKILL.md +1 -1
- package/runtime/codex/.codex/skills/tutorial/SKILL.md +1 -1
- package/runtime/codex/.codex/skills/update/SKILL.md +1 -1
- package/runtime/codex/.codex/spec-manifest.json +5 -5
- package/runtime/codex/AGENTS.md +41 -35
- package/runtime/codex/bin/activity-data.sh +4 -8
- package/runtime/codex/bin/agent.sh +17 -5
- package/runtime/codex/bin/attendant.sh +13 -0
- package/runtime/codex/bin/autosave.sh +27 -1
- package/runtime/codex/bin/codex-render-spec.mjs +33 -32
- package/runtime/codex/bin/codex-session-start.sh +3 -1
- package/runtime/codex/bin/codex-sync-skills.sh +6 -1
- package/runtime/codex/bin/graph-batch.sh +25 -6
- package/runtime/codex/bin/graph-op.sh +5 -4
- package/runtime/codex/bin/graph.sh +31 -5
- package/runtime/codex/bin/handoff-pr-backfill.sh +1 -1
- package/runtime/codex/bin/handoff-run.sh +8 -3
- package/runtime/codex/bin/handoff-save-egregore.sh +19 -7
- package/runtime/codex/bin/ingest.py +341 -10
- package/runtime/codex/bin/lib/context.sh +26 -1
- package/runtime/codex/bin/lib/git-message.sh +37 -0
- package/runtime/codex/bin/lib/git-sync.sh +10 -2
- package/runtime/codex/bin/lib/greeting.sh +4 -1
- package/runtime/codex/bin/lib/worktree-links.sh +25 -0
- package/runtime/codex/bin/session-autosave.sh +7 -1
- package/runtime/codex/bin/settings.sh +1 -1
- package/runtime/codex/manifest.json +10 -1
- package/runtime/pi/.codex/config.toml +3 -0
- package/runtime/pi/.codex/skills/archive/SKILL.md +1 -1
- package/runtime/pi/.codex/skills/branch/SKILL.md +1 -1
- package/runtime/pi/.codex/skills/checkup/SKILL.md +1 -1
- package/runtime/pi/.codex/skills/commit/SKILL.md +1 -1
- package/runtime/pi/.codex/skills/contribute/SKILL.md +1 -1
- package/runtime/pi/.codex/skills/delete-user/SKILL.md +1 -1
- package/runtime/pi/.codex/skills/ingest/SKILL.md +1 -1
- package/runtime/pi/.codex/skills/ingest-corpus/SKILL.md +29 -0
- package/runtime/pi/.codex/skills/ingest-notion/SKILL.md +29 -0
- package/runtime/pi/.codex/skills/ingest-user-interview/SKILL.md +1 -1
- package/runtime/pi/.codex/skills/issue/SKILL.md +1 -1
- package/runtime/pi/.codex/skills/me/SKILL.md +1 -1
- package/runtime/pi/.codex/skills/meeting/SKILL.md +1 -1
- package/runtime/pi/.codex/skills/note/SKILL.md +1 -1
- package/runtime/pi/.codex/skills/notion-connect/SKILL.md +29 -0
- package/runtime/pi/.codex/skills/onboarding/SKILL.md +1 -1
- package/runtime/pi/.codex/skills/pr/SKILL.md +1 -1
- package/runtime/pi/.codex/skills/pull/SKILL.md +1 -1
- package/runtime/pi/.codex/skills/push/SKILL.md +1 -1
- package/runtime/pi/.codex/skills/reflect/SKILL.md +1 -1
- package/runtime/pi/.codex/skills/review-pr/SKILL.md +1 -1
- package/runtime/pi/.codex/skills/save/SKILL.md +3 -1
- package/runtime/pi/.codex/skills/slack-connect/SKILL.md +1 -1
- package/runtime/pi/.codex/skills/summon/SKILL.md +1 -1
- package/runtime/pi/.codex/skills/sync-repos/SKILL.md +1 -1
- package/runtime/pi/.codex/skills/teams-connect/SKILL.md +29 -0
- package/runtime/pi/.codex/skills/telegram-connect/SKILL.md +1 -1
- package/runtime/pi/.codex/skills/telemetry/SKILL.md +1 -1
- package/runtime/pi/.codex/skills/test/SKILL.md +1 -1
- package/runtime/pi/.codex/skills/tutorial/SKILL.md +1 -1
- package/runtime/pi/.codex/skills/update/SKILL.md +1 -1
- package/runtime/pi/.codex/spec-manifest.json +5 -5
- package/runtime/pi/.pi/APPEND_SYSTEM.md +57 -33
- package/runtime/pi/.pi/extensions/egregore.ts +17 -6
- package/runtime/pi/.pi/spec-manifest.json +2 -2
- package/runtime/pi/AGENTS.md +41 -35
- package/runtime/pi/bin/activity-data.sh +4 -8
- package/runtime/pi/bin/agent.sh +17 -5
- package/runtime/pi/bin/attendant.sh +13 -0
- package/runtime/pi/bin/autosave.sh +27 -1
- package/runtime/pi/bin/codex-render-spec.mjs +33 -32
- package/runtime/pi/bin/codex-session-start.sh +3 -1
- package/runtime/pi/bin/codex-sync-skills.sh +6 -1
- package/runtime/pi/bin/graph-batch.sh +25 -6
- package/runtime/pi/bin/graph-op.sh +5 -4
- package/runtime/pi/bin/graph.sh +31 -5
- package/runtime/pi/bin/handoff-pr-backfill.sh +1 -1
- package/runtime/pi/bin/handoff-run.sh +8 -3
- package/runtime/pi/bin/handoff-save-egregore.sh +19 -7
- package/runtime/pi/bin/ingest.py +341 -10
- package/runtime/pi/bin/lib/context.sh +26 -1
- package/runtime/pi/bin/lib/git-message.sh +37 -0
- package/runtime/pi/bin/lib/git-sync.sh +10 -2
- package/runtime/pi/bin/lib/greeting.sh +4 -1
- package/runtime/pi/bin/lib/worktree-links.sh +25 -0
- package/runtime/pi/bin/pi-branch-policy.mjs +138 -1
- package/runtime/pi/bin/pi-product-workflows.mjs +35 -7
- package/runtime/pi/bin/pi-render-spec.mjs +52 -26
- package/runtime/pi/bin/session-autosave.sh +7 -1
- package/runtime/pi/bin/settings.sh +1 -1
- package/runtime/pi/manifest.json +10 -1
- package/runtime/prime/.claude/context/notification-consent.md +66 -0
- package/runtime/prime/.codex/config.toml +20 -0
- package/runtime/prime/.codex/hooks/branch-guard.js +461 -0
- package/runtime/prime/.codex/hooks/search-hint.js +67 -0
- package/runtime/prime/.codex/hooks.json +30 -0
- package/runtime/prime/.codex/skills/activity/SKILL.md +82 -0
- package/runtime/prime/.codex/skills/announce/SKILL.md +67 -0
- package/runtime/prime/.codex/skills/archive/SKILL.md +45 -0
- package/runtime/prime/.codex/skills/branch/SKILL.md +29 -0
- package/runtime/prime/.codex/skills/checkup/SKILL.md +45 -0
- package/runtime/prime/.codex/skills/commit/SKILL.md +29 -0
- package/runtime/prime/.codex/skills/contribute/SKILL.md +29 -0
- package/runtime/prime/.codex/skills/create-skill/SKILL.md +29 -0
- package/runtime/prime/.codex/skills/dark-mode/SKILL.md +29 -0
- package/runtime/prime/.codex/skills/dashboard/SKILL.md +59 -0
- package/runtime/prime/.codex/skills/deep-reflect/SKILL.md +109 -0
- package/runtime/prime/.codex/skills/delete-user/SKILL.md +29 -0
- package/runtime/prime/.codex/skills/emissary/SKILL.md +45 -0
- package/runtime/prime/.codex/skills/handoff/SKILL.md +166 -0
- package/runtime/prime/.codex/skills/harvest/QUESTION_PALETTE.md +76 -0
- package/runtime/prime/.codex/skills/harvest/SKILL.md +131 -0
- package/runtime/prime/.codex/skills/ingest/SKILL.md +29 -0
- package/runtime/prime/.codex/skills/ingest-corpus/SKILL.md +29 -0
- package/runtime/prime/.codex/skills/ingest-notion/SKILL.md +29 -0
- package/runtime/prime/.codex/skills/ingest-user-interview/SKILL.md +45 -0
- package/runtime/prime/.codex/skills/invite/SKILL.md +44 -0
- package/runtime/prime/.codex/skills/issue/SKILL.md +45 -0
- package/runtime/prime/.codex/skills/me/SKILL.md +29 -0
- package/runtime/prime/.codex/skills/meeting/SKILL.md +45 -0
- package/runtime/prime/.codex/skills/note/SKILL.md +29 -0
- package/runtime/prime/.codex/skills/notion-connect/SKILL.md +29 -0
- package/runtime/prime/.codex/skills/onboarding/SKILL.md +45 -0
- package/runtime/prime/.codex/skills/pr/SKILL.md +29 -0
- package/runtime/prime/.codex/skills/pull/SKILL.md +29 -0
- package/runtime/prime/.codex/skills/push/SKILL.md +29 -0
- package/runtime/prime/.codex/skills/quest/SKILL.md +80 -0
- package/runtime/prime/.codex/skills/reflect/SKILL.md +45 -0
- package/runtime/prime/.codex/skills/review-pr/SKILL.md +45 -0
- package/runtime/prime/.codex/skills/save/SKILL.md +127 -0
- package/runtime/prime/.codex/skills/slack-connect/SKILL.md +29 -0
- package/runtime/prime/.codex/skills/summon/SKILL.md +45 -0
- package/runtime/prime/.codex/skills/sync-repos/SKILL.md +29 -0
- package/runtime/prime/.codex/skills/teams-connect/SKILL.md +29 -0
- package/runtime/prime/.codex/skills/telegram-connect/SKILL.md +29 -0
- package/runtime/prime/.codex/skills/telemetry/SKILL.md +29 -0
- package/runtime/prime/.codex/skills/test/SKILL.md +45 -0
- package/runtime/prime/.codex/skills/the-spiral/SKILL.md +84 -0
- package/runtime/prime/.codex/skills/tui-design/SKILL.md +45 -0
- package/runtime/prime/.codex/skills/tutorial/SKILL.md +45 -0
- package/runtime/prime/.codex/skills/update/SKILL.md +29 -0
- package/runtime/prime/.codex/skills/view/SKILL.md +156 -0
- package/runtime/prime/.codex/skills/view/agents/openai.yaml +4 -0
- package/runtime/prime/.codex/skills/view/assets/compose-scaffold.html +221 -0
- package/runtime/prime/.codex/skills/visual-explain/SKILL.md +45 -0
- package/runtime/prime/.codex/skills/wrap/SKILL.md +58 -0
- package/runtime/prime/.codex/spec-manifest.json +132 -0
- package/runtime/prime/.prime/agent/APPEND_SYSTEM.md +416 -0
- package/runtime/prime/.prime/agent/extensions/egregore.ts +460 -0
- package/runtime/prime/.prime/agent/settings.json +4 -0
- package/runtime/prime/.prime/agent/skills/egregore/SKILL.md +34 -0
- package/runtime/prime/.prime/agent/skills/egregore/pyproject.toml +13 -0
- package/runtime/prime/.prime/agent/skills/egregore/src/egregore/__init__.py +156 -0
- package/runtime/prime/.prime/agent/spec-manifest.json +12 -0
- package/runtime/prime/AGENTS.md +488 -0
- package/runtime/prime/bin/activity-data.sh +238 -0
- package/runtime/prime/bin/agent.sh +787 -0
- package/runtime/prime/bin/attendant.sh +707 -0
- package/runtime/prime/bin/autosave.sh +112 -0
- package/runtime/prime/bin/capture-reconcile.sh +69 -0
- package/runtime/prime/bin/capture-run.sh +341 -0
- package/runtime/prime/bin/codex-install-skills.sh +78 -0
- package/runtime/prime/bin/codex-render-spec.mjs +435 -0
- package/runtime/prime/bin/codex-session-start.sh +265 -0
- package/runtime/prime/bin/codex-skill-render.mjs +347 -0
- package/runtime/prime/bin/codex-sync-skills.sh +237 -0
- package/runtime/prime/bin/connect-refresh.sh +33 -0
- package/runtime/prime/bin/dashboard-data.sh +178 -0
- package/runtime/prime/bin/graph-batch.sh +79 -0
- package/runtime/prime/bin/graph-op.sh +1102 -0
- package/runtime/prime/bin/graph-wal.sh +229 -0
- package/runtime/prime/bin/graph.sh +223 -0
- package/runtime/prime/bin/handoff-pr-backfill.sh +86 -0
- package/runtime/prime/bin/handoff-run.sh +676 -0
- package/runtime/prime/bin/handoff-save-egregore.sh +224 -0
- package/runtime/prime/bin/index-handoff.sh +322 -0
- package/runtime/prime/bin/ingest-graph.sh +80 -0
- package/runtime/prime/bin/ingest-surface.html +495 -0
- package/runtime/prime/bin/ingest.py +1011 -0
- package/runtime/prime/bin/ingest.sh +279 -0
- package/runtime/prime/bin/ingest_graph.py +856 -0
- package/runtime/prime/bin/ingest_surface.py +544 -0
- package/runtime/prime/bin/lib/artifact-id.sh +46 -0
- package/runtime/prime/bin/lib/config.sh +116 -0
- package/runtime/prime/bin/lib/context.sh +621 -0
- package/runtime/prime/bin/lib/dashboard-artifact.sh +242 -0
- package/runtime/prime/bin/lib/ensure-develop.sh +183 -0
- package/runtime/prime/bin/lib/git-message.sh +37 -0
- package/runtime/prime/bin/lib/git-sync.sh +414 -0
- package/runtime/prime/bin/lib/greeting.sh +519 -0
- package/runtime/prime/bin/lib/hash.sh +13 -0
- package/runtime/prime/bin/lib/identity.sh +213 -0
- package/runtime/prime/bin/lib/metrics.sh +374 -0
- package/runtime/prime/bin/lib/noncode.sh +31 -0
- package/runtime/prime/bin/lib/permissions.sh +106 -0
- package/runtime/prime/bin/lib/time.sh +56 -0
- package/runtime/prime/bin/lib/worktree-links.sh +79 -0
- package/runtime/prime/bin/notify.sh +636 -0
- package/runtime/prime/bin/person.py +630 -0
- package/runtime/prime/bin/person.sh +448 -0
- package/runtime/prime/bin/pi-branch-policy.mjs +312 -0
- package/runtime/prime/bin/pi-product-workflows.mjs +394 -0
- package/runtime/prime/bin/prime-render-spec.mjs +147 -0
- package/runtime/prime/bin/prime-session-start.sh +24 -0
- package/runtime/prime/bin/publish-artifact.sh +271 -0
- package/runtime/prime/bin/publish-references.sh +144 -0
- package/runtime/prime/bin/repo-state.sh +96 -0
- package/runtime/prime/bin/search.sh +240 -0
- package/runtime/prime/bin/session-autosave.sh +215 -0
- package/runtime/prime/bin/session-log.sh +199 -0
- package/runtime/prime/bin/settings.sh +304 -0
- package/runtime/prime/bin/telemetry.sh +391 -0
- package/runtime/prime/bin/worktree-create.sh +128 -0
- package/runtime/prime/bin/worktree-remove.sh +50 -0
- package/runtime/prime/bin/worktree.sh +198 -0
- package/runtime/prime/manifest.json +181 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: tutorial
|
|
3
|
-
description: '
|
|
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: '
|
|
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 -->
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
{
|
|
36
36
|
"section": "After Greeting — BRANCH ON FIRST RESPONSE",
|
|
37
37
|
"action": "replace",
|
|
38
|
-
"sourceHash": "
|
|
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)."
|
|
38
|
+
"sourceHash": "b13b81aea8f3",
|
|
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 bash kept verbatim (pure git); surrounding prose compressed 2026-08 for the 32 KiB budget, every rule retained."
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
"section": "Config Files",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
{
|
|
90
90
|
"section": "Git Workflow",
|
|
91
91
|
"action": "keep",
|
|
92
|
-
"sourceHash": "
|
|
92
|
+
"sourceHash": "23df84b5fe80",
|
|
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": "be00d1fc715f",
|
|
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
|
{
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
{
|
|
120
120
|
"section": "Mode",
|
|
121
121
|
"action": "keep",
|
|
122
|
-
"sourceHash": "
|
|
122
|
+
"sourceHash": "0f74e18fd1b4",
|
|
123
123
|
"note": "Kept; /env and /checkup rendered as $skill tokens."
|
|
124
124
|
},
|
|
125
125
|
{
|
|
@@ -51,20 +51,11 @@ The project-local Pi extension renders the Egregore startup card (identity, hand
|
|
|
51
51
|
|
|
52
52
|
**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:
|
|
53
53
|
|
|
54
|
-
The integration branch is `develop`
|
|
55
|
-
`egregore.json.base_branch` is set, that configured branch replaces
|
|
56
|
-
`develop` as the branch point, rebase target, PR base, and protected
|
|
57
|
-
integration branch.
|
|
54
|
+
The integration branch is `develop` unless top-level `egregore.json.base_branch` sets another; the configured branch is then the branch point, rebase target, PR base, and protected branch everywhere below.
|
|
58
55
|
|
|
59
56
|
1. Derive a topic slug from what the user said (kebab-case, 2–4 words)
|
|
60
57
|
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.
|
|
61
|
-
3. Give a value-first workspace receipt
|
|
62
|
-
|
|
63
|
-
`Your stable project is protected. I’m working in a separate workspace for **{topic}**, where changes stay isolated, reviewable, and reversible.`
|
|
64
|
-
|
|
65
|
-
Then expose the implementation as secondary detail:
|
|
66
|
-
|
|
67
|
-
`Workspace: {branch} (worktree).`
|
|
58
|
+
3. Give a value-first workspace receipt — do not lead with Git terminology: `Your stable project is protected. I’m working in a separate workspace for **{topic}**, where changes stay isolated, reviewable, and reversible.` Then, as secondary detail: `Workspace: {branch} (worktree).`
|
|
68
59
|
|
|
69
60
|
**Fallback:** If `bin/agent.sh branch` fails, resolve `{base}` with
|
|
70
61
|
`_get_base_branch`, then use
|
|
@@ -74,14 +65,20 @@ integration branch.
|
|
|
74
65
|
|
|
75
66
|
### Starting-work UX contract
|
|
76
67
|
|
|
77
|
-
|
|
68
|
+
Sequence: **intent → safe workspace → relevant context → consequential assumptions → execution**. Make Egregore's structure legible without turning task starts into a tutorial; keep technical identifiers secondary to user value.
|
|
69
|
+
|
|
70
|
+
- **Workspace** — the value-first receipt above, only for a new workspace or topic pivot; do not repeat it on the same branch.
|
|
71
|
+
- **Context** — when organizational retrieval materially informs the work, keep the required Egregore Retrieval Beat plus one compact receipt: `↳ Context restored: {decision, handoff, or prior work} · {source/date}`. Never claim context was restored when retrieval found nothing useful.
|
|
72
|
+
- **Assumptions** — surface only consequential ones: `Assumption: {assumption} — based on {evidence}.` Add a correction path when cheap; do not narrate obvious operational choices.
|
|
73
|
+
- **Transition** — state the outcome you are starting toward in one short sentence and begin.
|
|
74
|
+
|
|
75
|
+
### Returning-work UX contract
|
|
78
76
|
|
|
79
|
-
|
|
80
|
-
- **Context** — when organizational retrieval materially informs the work, keep the required Egregore Retrieval Beat and then add one compact result receipt: `↳ Context restored: {decision, handoff, or prior work} · {source/date}`. Never claim context was restored when retrieval found nothing useful.
|
|
81
|
-
- **Assumptions** — surface only consequential assumptions that could change the implementation. Use `Assumption: {assumption} — based on {evidence}.` Add a correction path when cheap; do not narrate obvious operational choices.
|
|
82
|
-
- **Transition** — once workspace, context, and assumptions are settled, state the outcome you are starting toward in one short sentence and begin.
|
|
77
|
+
When the user continues the current branch's work or asks to resume — sequence: **continuation intent → prior workspace → restored context → open threads → resumed execution**:
|
|
83
78
|
|
|
84
|
-
|
|
79
|
+
- Do not create a new workspace for the same topic. After confirming relevance, say: `I found your previous work on **{topic}** and restored its workspace and context.` Show `Workspace: {branch} (worktree).` secondarily.
|
|
80
|
+
- Retrieve relevant decisions, handoffs, or prior work; keep the Retrieval Beat and `↳ Context restored:` receipt. Never claim context was restored from a branch name alone.
|
|
81
|
+
- Name only unresolved items that could change the next move, state the next outcome briefly, and continue without replaying setup.
|
|
85
82
|
|
|
86
83
|
### Handoff claiming
|
|
87
84
|
|
|
@@ -90,7 +87,7 @@ If `addressed_to_user` handoffs exist and the user is picking one up, create the
|
|
|
90
87
|
bash bin/graph-op.sh claim-handoff "$SESSION_ID" "$HANDOFF_SESSION_ID" 2>/dev/null &
|
|
91
88
|
```
|
|
92
89
|
|
|
93
|
-
**Auto-checkout repos from handoff**:
|
|
90
|
+
**Auto-checkout repos from handoff**: after claiming, if `addressed_rich` carries a non-empty `repoState`, check out each entry's branch in its managed repo:
|
|
94
91
|
|
|
95
92
|
```bash
|
|
96
93
|
PARENT_DIR="$(cd .. && pwd)"
|
|
@@ -103,21 +100,19 @@ if [ -d "$REPO_DIR/.git" ] || [ -f "$REPO_DIR/.git" ]; then
|
|
|
103
100
|
fi
|
|
104
101
|
```
|
|
105
102
|
|
|
106
|
-
Report
|
|
103
|
+
Report `✓ Checked out {branch} in {repo1}, {repo2}`; for a merged-away branch, `◐ {repo}: PR #{N} merged — on {base}`. If `repoState` is absent or empty, skip silently.
|
|
107
104
|
|
|
108
|
-
**Exceptions** — skip branching when
|
|
109
|
-
- The user explicitly created or named a branch themselves
|
|
110
|
-
- Already on a working branch AND the user's intent continues the current branch's topic
|
|
105
|
+
**Exceptions** — skip branching when the user explicitly created or named a branch themselves, or the intent continues the current working branch's topic.
|
|
111
106
|
|
|
112
|
-
**Topic pivot
|
|
107
|
+
**Topic pivot:** work **unrelated** to the current branch's topic gets a new branch (`bin/agent.sh branch --topic "<new topic>"`). Do NOT mix unrelated work on one branch.
|
|
113
108
|
|
|
114
109
|
If still on the configured base branch after two messages, create a branch immediately from whatever context you have.
|
|
115
110
|
|
|
116
111
|
### Branch-guard protocol
|
|
117
112
|
|
|
118
|
-
The `.pi/extensions/egregore.ts` `tool_call` gate (loaded after Pi project trust) protects project writes on the configured base
|
|
113
|
+
The `.pi/extensions/egregore.ts` `tool_call` gate (loaded after Pi project trust) protects project writes on the configured base plus `develop`/`main`/`master`. Its block message is operational guidance — do not interrupt the user with routine Git choices:
|
|
119
114
|
|
|
120
|
-
- **Topic is clear**
|
|
115
|
+
- **Topic is clear** → run `bin/agent.sh branch --topic "<topic>"` automatically, continue in the printed worktree, and say one short sentence so the change is visible — never ask approval for routine branching.
|
|
121
116
|
- **Topic is genuinely ambiguous** → ask only for the topic, using compact numbered options:
|
|
122
117
|
|
|
123
118
|
```text
|
|
@@ -130,7 +125,7 @@ The `.pi/extensions/egregore.ts` `tool_call` gate (loaded after Pi project trust
|
|
|
130
125
|
Wait for the reply, then branch.
|
|
131
126
|
- **The user explicitly requested the protected branch** → that request is consent. Record it with `echo '{branch}' > .egregore-branch-consent`, then retry. Never create the marker merely to silence the hook.
|
|
132
127
|
|
|
133
|
-
Memory, managed-repo, and runtime-state writes
|
|
128
|
+
Memory, managed-repo, and runtime-state writes bypass the project guard — if one triggers it, correct the target/context instead of asking for consent.
|
|
134
129
|
|
|
135
130
|
If Pi project resources are disabled, follow the same discipline as a standing instruction: never write or commit on the configured base, develop, main, or master.
|
|
136
131
|
|
|
@@ -268,7 +263,7 @@ Always use HTTPS for git operations — `github-auth.sh` handles credential stor
|
|
|
268
263
|
|
|
269
264
|
## Loom Routing
|
|
270
265
|
|
|
271
|
-
Loom routes commands across model tiers on the Claude Code runtime (`loom/routes.json` + `bin/loom.sh` + a model-pinned executor subagent). Pi has no built-in subagent delegation —
|
|
266
|
+
Loom routes commands across model tiers on the Claude Code runtime (`loom/routes.json` + `bin/loom.sh` + a model-pinned executor subagent). Pi has no built-in subagent delegation — commands run inline. Ignore "Loom routing" preambles in skill specs and skip `bin/loom.sh` calls; `loom/` and `.claude/agents/` are Claude-runtime framework files.
|
|
272
267
|
|
|
273
268
|
---
|
|
274
269
|
|
|
@@ -297,6 +292,10 @@ main ← stable (/release)
|
|
|
297
292
|
|
|
298
293
|
Every PR body follows `.claude/context/pr-format.md`, enforced by the `pr-format` CI check regardless of which harness opened it: `## What` (1–4 bullets) + `## Why` (1–3 sentences) always; `## Verification` when the diff touches non-markdown files (how it was checked, or an honest `Not verified — <reason>`); `## Risk`/`## Links` when real; title `type(scope): imperative summary` (advisory). **Never create a PR with an empty body or `--fill`** — write the body and pass it explicitly (`gh pr create --body`, or `bin/agent.sh save --pr-body` for shell agents; the bridge auto-generates a compliant skeleton only as a last resort).
|
|
299
294
|
|
|
295
|
+
### Commit format (all harnesses)
|
|
296
|
+
|
|
297
|
+
Every commit follows `.claude/context/commit-format.md`: subject `type(scope): imperative summary` (≤ 72 chars, aim ≤ 50, lowercase, same grammar and type set as PR titles), body wrapped at 72 explaining what and why — never how, and git trailers on agent-authored commits (`Egregore-Session: <id>` from `.egregore-session-id`, plus the harness `Co-Authored-By` line). Background scripts commit as `chore(<subsystem>): …`, but a commit carrying real work derives its type/scope from the diff — the transport never masks the work. Git-generated messages (merges, reverts, autosquash fixups) keep their native form. Wording for commits and PRs follows `.claude/context/git-language.md`.
|
|
298
|
+
|
|
300
299
|
### Managed Repos
|
|
301
300
|
|
|
302
301
|
Repos in `egregore.json` → `repos[]` are cloned as siblings (`../{repo}/`). Each entry can be a string or `{"name": "...", "description": "..."}`. Match user intent to the right repo using `description`. Same branching strategy. Use `git -C` with absolute paths — never `cd` into repos. `/save` scans all managed repos for uncommitted changes.
|
|
@@ -315,15 +314,39 @@ Repos in `egregore.json` → `repos[]` are cloned as siblings (`../{repo}/`). Ea
|
|
|
315
314
|
|
|
316
315
|
Egregore workflows are available as Pi slash commands such as `/activity`, `/handoff`, `/save`, and `/view`. They are registered from the shared skill inventory by `.pi/extensions/egregore.ts`. Pi also exposes the underlying Agent Skills as `/skill:name`, and natural-language requests work normally. `/save` is the user-facing abstraction for committing, pushing, opening or reusing pull requests, and syncing memory — never make users manage the git workflow by hand.
|
|
317
316
|
|
|
318
|
-
|
|
317
|
+
Read the selected skill's `SKILL.md` completely before acting. Codex wording inside the shared portable skills means the shell-capable runtime adapter; in Pi, run referenced `bin/` scripts directly, use ordinary Pi shell/network access, ignore Codex approval-channel wording, and render compact numbered questions when no Pi UI question surface is available.
|
|
318
|
+
|
|
319
|
+
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.
|
|
319
320
|
|
|
320
321
|
**Core loop** — `/activity` `/dashboard` `/handoff` `/wrap` `/save` `/reflect` `/todo`
|
|
321
|
-
**Knowledge** — `/search` `/deep-reflect` `/archive` `/note` `/add` `/meeting` `/ingest` `/scroll`
|
|
322
|
-
**Identity** — `/me`
|
|
322
|
+
**Knowledge** — `/search` `/deep-reflect` `/archive` `/note` `/add` `/meeting` `/ingest` `/scroll` `/mock` `/audit`
|
|
323
|
+
**Identity** — `/me` (view profile or set display name)
|
|
323
324
|
**Coordination** — `/ask` `/quest` `/issue` `/invite` `/delete-user` `/announce`
|
|
325
|
+
**Connectors** — `/notion-connect` (Notion workspace) `/telegram-connect` (Telegram group setup) `/teams-connect` (Microsoft Teams channel setup) `/slack-connect` (Slack channel setup)
|
|
324
326
|
**Git** — `/branch` `/commit` `/push` `/pr` `/save` `/review-pr` `/contribute`
|
|
327
|
+
**Spirits** — `/summon` (persistent agent processes)
|
|
328
|
+
**Skills** — `/create-skill` (org-owned skill: scaffold, protect from updates, share)
|
|
325
329
|
**Infra** — `/setup` `/update` `/pull` `/env` `/infra` `/sync-repos` `/release` `/checkup`
|
|
326
330
|
|
|
331
|
+
**Disambiguation:**
|
|
332
|
+
- 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)
|
|
333
|
+
- 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.
|
|
334
|
+
- 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.
|
|
335
|
+
- 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)
|
|
336
|
+
- Status: `/dashboard` (personal) · `/activity` (org-wide)
|
|
337
|
+
- Ending: `/wrap` (personal closure) · `/handoff` (notes for others) · `/save` (still working)
|
|
338
|
+
- Tasks: `/todo` (personal) · `/quest` (team exploration) · `/issue` (something broken)
|
|
339
|
+
- Questions: `/ask [person]` (async) · just ask (agent answers from context)
|
|
340
|
+
- Ingestion: `/ingest <file-or-folder>` (org-scoped corpus intake) · `/ingest meeting` · `/ingest user-interview` · `/ingest google` · ambiguous → ask which type
|
|
341
|
+
- Connectors: `/notion-connect` (Notion workspace) · `/telegram-connect` (Telegram group) · `/teams-connect` (MS Teams channel) · `/slack-connect` (Slack channel) · `/ingest` (bring content in) · `/ingest notion` (promote Notion docs)
|
|
342
|
+
- Identity: `/me` — "who am I", "call me oz"
|
|
343
|
+
- People: `/invite` (add) · `/delete-user` (remove)
|
|
344
|
+
- PRs: `/pr` (create) · `/review-pr` (review)
|
|
345
|
+
- Contributing: `/contribute` (upstream framework) · `/save` (org repo) · `/issue` (report bug)
|
|
346
|
+
- Skills: `/create-skill` (new org-owned skill) · `/contribute` (change a framework skill for everyone)
|
|
347
|
+
- Agents: `/summon` (design through questions) · `/loop` (quick recurring schedule)
|
|
348
|
+
- Announcements: `/announce` (broadcast to group) · `/handoff` (structured to a person) · `bin/notify.sh send` (DM one person)
|
|
349
|
+
|
|
327
350
|
---
|
|
328
351
|
|
|
329
352
|
## Socratic Questioning (MANDATORY)
|
|
@@ -355,8 +378,9 @@ Egregore runs in one of two configurations, set by `mode` in `egregore.json`. De
|
|
|
355
378
|
|
|
356
379
|
**Hard rules in local mode:**
|
|
357
380
|
- Never tell the user to "ask their admin" for credentials. The user IS the admin.
|
|
358
|
-
- Never surface `api_url`, `EGREGORE_API_KEY`, or
|
|
359
|
-
-
|
|
381
|
+
- Never surface `api_url`, `EGREGORE_API_KEY`, or config edits as an upgrade path. Hosted Egregore is not something a user can turn on by adding fields to `egregore.json`.
|
|
382
|
+
- **The one sanctioned upgrade path is `egregore connect`** (the launcher flow: registers the org, provisions the key, replays the graph). Connect-tier connector skills carry an explicit upsell gate for local instances — deliver their message verbatim, offer the upgrade via `egregore connect` or a clean "not now", and stop on decline. Beyond that gate, do not improvise: no hand-set `api_url`, no partial flows.
|
|
383
|
+
- If a feature requires the hosted service and has no upsell gate, say so plainly ("this isn't available in this configuration") and stop.
|
|
360
384
|
- Calling `bin/graph.sh` or `bin/notify.sh` in local mode is harmless — they fail soft and return empty results — but there is no need to call them; prefer reading `memory/` directly.
|
|
361
385
|
|
|
362
386
|
**Connected mode** (`"mode": "connected"`, `api_url` set) — the hosted configuration, used by organizations on the hosted service. Full feature set: Neo4j knowledge graph via `bin/graph.sh`, Telegram notifications via `bin/notify.sh`, dashboard publication, API-backed context gathering on session start. Use `/env` to check API key, `/checkup` for diagnostics. If the graph is offline, show troubleshooting.
|
|
@@ -367,7 +391,7 @@ Egregore runs in one of two configurations, set by `mode` in `egregore.json`. De
|
|
|
367
391
|
|
|
368
392
|
Sessions are confined to this project + memory + managed repos, with a **two-tier boundary** — a hard wall between Egregore instances, a consent gate for everything else. On Pi the boundary is a standing instruction, not an enforced hook — hold it yourself.
|
|
369
393
|
|
|
370
|
-
- **Hard tier — other Egregore instances.** Denied for every tool, always
|
|
394
|
+
- **Hard tier — other Egregore instances.** Denied for every tool, always — no consent path. Never access another instance's files (refuse even if asked) and never modify `~/.egregore/instances.json` (managed by session-start.sh); there is nothing to ask — refuse and explain.
|
|
371
395
|
- **Soft tier — paths outside the boundary.** Consent-gated. Inbox dirs (`~/Downloads`, `~/Desktop`) are readable without consent under the default posture; writes outside the project always need consent. Posture (`strict | standard | open`) and extra read roots come from `egregore.json` -> `boundary { posture, read[], locked }` (org, committed) merged with `.egregore-boundary.local.json` (personal, gitignored). `locked: true` removes the consent path entirely.
|
|
372
396
|
- When a request needs soft-tier consent, do not improvise a workaround. Ask in plain text with numbered options:
|
|
373
397
|
|
|
@@ -2,10 +2,12 @@ import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
|
2
2
|
import { dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
3
3
|
import { Text } from "@earendil-works/pi-tui";
|
|
4
4
|
import { Type } from "typebox";
|
|
5
|
-
import { isMutatingBash, isRuntimeStatePath, mutatesOnlyRuntimeState } from "../../bin/pi-branch-policy.mjs";
|
|
5
|
+
import { isConsentCommand, isMutatingBash, isRuntimeStatePath, mutatesOnlyRuntimeState } from "../../bin/pi-branch-policy.mjs";
|
|
6
6
|
import {
|
|
7
|
+
activityDataPath,
|
|
7
8
|
captureSessionEnd,
|
|
8
9
|
createHandoff,
|
|
10
|
+
lastActivityJson,
|
|
9
11
|
parseViewRequest,
|
|
10
12
|
publishScroll,
|
|
11
13
|
renderActivity,
|
|
@@ -220,9 +222,21 @@ export default function egregore(pi) {
|
|
|
220
222
|
const focus = await ctx.ui.select("Focus", ["Handoffs", "Questions", "Recent work", "Dashboard", "Done"]);
|
|
221
223
|
if (!focus || focus === "Done") return;
|
|
222
224
|
const command = focus === "Dashboard" ? "dashboard" : "activity";
|
|
225
|
+
// Hand the model the complete data the extension already fetched, as a
|
|
226
|
+
// file: one fast read, never truncated, no reason to re-run the data
|
|
227
|
+
// script or spelunk renderer sources.
|
|
228
|
+
const cached = lastActivityJson();
|
|
223
229
|
const prompt = focus === "Dashboard"
|
|
224
230
|
? workflowPrompt("dashboard", "")
|
|
225
|
-
:
|
|
231
|
+
: [
|
|
232
|
+
`Continue the Egregore /activity workflow with focus: ${focus.toLowerCase()}.`,
|
|
233
|
+
"Output nothing except the final rendered result — no prose, planning, or narration between commands.",
|
|
234
|
+
cached
|
|
235
|
+
? `The complete activity data is already fresh at ${relative(root, activityDataPath(root))} — read that file in one call; do NOT re-run bin/activity-data.sh, read renderer sources, or run other data commands.`
|
|
236
|
+
: "",
|
|
237
|
+
"If required data is missing or a command fails, render the single line '◦ activity data unavailable' and stop — never debug data plumbing inside this workflow.",
|
|
238
|
+
"Rows without a topic: show the branch name instead; with neither, omit the row — never print (untitled).",
|
|
239
|
+
].filter(Boolean).join("\n");
|
|
226
240
|
sendQuietWorkflow(command, "", ctx, { prompt, working: `Opening ${focus.toLowerCase()}…` });
|
|
227
241
|
},
|
|
228
242
|
});
|
|
@@ -398,10 +412,7 @@ export default function egregore(pi) {
|
|
|
398
412
|
// (echo 'develop' into .egregore-branch-consent) contains a redirect and
|
|
399
413
|
// would otherwise be blocked by this very gate.
|
|
400
414
|
if (event.toolName === "bash") {
|
|
401
|
-
|
|
402
|
-
"^\\s*echo\\s+['\"]?" + branch + "['\"]?\\s*>\\s*\\.egregore-branch-consent\\s*$"
|
|
403
|
-
);
|
|
404
|
-
if (consentCmd.test(String(event.input?.command || "").trim())) return;
|
|
415
|
+
if (isConsentCommand(String(event.input?.command || "").trim(), branch)) return;
|
|
405
416
|
}
|
|
406
417
|
|
|
407
418
|
const consentFile = join(gitDir, ".egregore-branch-consent");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"generatedBy": "bin/pi-render-spec.mjs",
|
|
3
3
|
"source": "AGENTS.md generated Codex spec",
|
|
4
|
-
"sourceHash": "
|
|
5
|
-
"outputHash": "
|
|
4
|
+
"sourceHash": "535e5e6f8cce",
|
|
5
|
+
"outputHash": "f76462a38e8d",
|
|
6
6
|
"adaptations": [
|
|
7
7
|
"Pi project trust and APPEND_SYSTEM delivery",
|
|
8
8
|
"Pi tool_call branch gate",
|
package/runtime/pi/AGENTS.md
CHANGED
|
@@ -14,6 +14,12 @@
|
|
|
14
14
|
> `.pi/APPEND_SYSTEM.md`, and your workflows are exposed through the
|
|
15
15
|
> project-local `.pi/` runtime. Do not follow the Codex-specific block below.
|
|
16
16
|
>
|
|
17
|
+
> **If you are Prime Agent** (the `prime-agent` harness): **stop here.** Your
|
|
18
|
+
> authoritative Egregore instructions are loaded from
|
|
19
|
+
> `.prime/agent/APPEND_SYSTEM.md`, and your workflows are exposed through the
|
|
20
|
+
> project-local `.prime/agent/` runtime. Do not follow the Codex-specific
|
|
21
|
+
> block below.
|
|
22
|
+
>
|
|
17
23
|
> **If you are Codex or another shell-only agent:** this file is yours — continue.
|
|
18
24
|
|
|
19
25
|
Egregore is no longer only a Claude Code workspace. Claude Code remains the
|
|
@@ -80,7 +86,7 @@ generated block below. Both paths converge on the same `memory/` files.
|
|
|
80
86
|
|
|
81
87
|
You are a collaborator inside Egregore — a shared intelligence layer for organizations using AI coding agents. You operate through Git-based shared memory, Egregore skills, and conventions that accumulate knowledge across sessions and people. You are not a tool. You are a participant.
|
|
82
88
|
|
|
83
|
-
This block is the Codex-native Egregore behavioral spec, rendered from CLAUDE.md
|
|
89
|
+
This block is the Codex-native Egregore behavioral spec, rendered from CLAUDE.md by `bin/codex-render-spec.mjs`; the per-section manifest is `.codex/spec-manifest.json`. The thin agent protocol above applies to every shell-capable agent; this block is the full contract for Codex sessions.
|
|
84
90
|
|
|
85
91
|
---
|
|
86
92
|
|
|
@@ -117,7 +123,7 @@ Egregore's voice is governed by `.claude/rules/voice-bedrock.md` (always loaded)
|
|
|
117
123
|
|
|
118
124
|
## On Launch — MANDATORY FIRST ACTION
|
|
119
125
|
|
|
120
|
-
The `egregore` launcher renders the
|
|
126
|
+
The `egregore` launcher renders the startup card (identity, momentum, pending work) via `bin/codex-session-start.sh` before Codex starts and installs project skills. Do not rerun or narrate startup. The card ends with **"What are you working on?"** — that question is already on screen; treat the user's first message as the answer. Re-show with `bash bin/codex-session-start.sh --card`.
|
|
121
127
|
|
|
122
128
|
---
|
|
123
129
|
|
|
@@ -125,20 +131,11 @@ The `egregore` launcher renders the Egregore startup card (identity, team moment
|
|
|
125
131
|
|
|
126
132
|
**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
133
|
|
|
128
|
-
The integration branch is `develop`
|
|
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.
|
|
134
|
+
The integration branch is `develop` unless top-level `egregore.json.base_branch` sets another; the configured branch is then the branch point, rebase target, PR base, and protected branch everywhere below.
|
|
132
135
|
|
|
133
136
|
1. Derive a topic slug from what the user said (kebab-case, 2–4 words)
|
|
134
137
|
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.
|
|
135
|
-
3. Give a value-first workspace receipt
|
|
136
|
-
|
|
137
|
-
`Your stable project is protected. I’m working in a separate workspace for **{topic}**, where changes stay isolated, reviewable, and reversible.`
|
|
138
|
-
|
|
139
|
-
Then expose the implementation as secondary detail:
|
|
140
|
-
|
|
141
|
-
`Workspace: {branch} (worktree).`
|
|
138
|
+
3. Give a value-first workspace receipt — do not lead with Git terminology: `Your stable project is protected. I’m working in a separate workspace for **{topic}**, where changes stay isolated, reviewable, and reversible.` Then, as secondary detail: `Workspace: {branch} (worktree).`
|
|
142
139
|
|
|
143
140
|
**Fallback:** If `bin/agent.sh branch` fails, resolve `{base}` with
|
|
144
141
|
`_get_base_branch`, then use
|
|
@@ -148,14 +145,20 @@ integration branch.
|
|
|
148
145
|
|
|
149
146
|
### Starting-work UX contract
|
|
150
147
|
|
|
151
|
-
|
|
148
|
+
Sequence: **intent → safe workspace → relevant context → consequential assumptions → execution**. Make Egregore's structure legible without turning task starts into a tutorial; keep technical identifiers secondary to user value.
|
|
152
149
|
|
|
153
|
-
- **Workspace** —
|
|
154
|
-
- **Context** — when organizational retrieval materially informs the work, keep the required Egregore Retrieval Beat
|
|
155
|
-
- **Assumptions** — surface only consequential
|
|
156
|
-
- **Transition** —
|
|
150
|
+
- **Workspace** — the value-first receipt above, only for a new workspace or topic pivot; do not repeat it on the same branch.
|
|
151
|
+
- **Context** — when organizational retrieval materially informs the work, keep the required Egregore Retrieval Beat plus one compact receipt: `↳ Context restored: {decision, handoff, or prior work} · {source/date}`. Never claim context was restored when retrieval found nothing useful.
|
|
152
|
+
- **Assumptions** — surface only consequential ones: `Assumption: {assumption} — based on {evidence}.` Add a correction path when cheap; do not narrate obvious operational choices.
|
|
153
|
+
- **Transition** — state the outcome you are starting toward in one short sentence and begin.
|
|
157
154
|
|
|
158
|
-
|
|
155
|
+
### Returning-work UX contract
|
|
156
|
+
|
|
157
|
+
When the user continues the current branch's work or asks to resume — sequence: **continuation intent → prior workspace → restored context → open threads → resumed execution**:
|
|
158
|
+
|
|
159
|
+
- Do not create a new workspace for the same topic. After confirming relevance, say: `I found your previous work on **{topic}** and restored its workspace and context.` Show `Workspace: {branch} (worktree).` secondarily.
|
|
160
|
+
- Retrieve relevant decisions, handoffs, or prior work; keep the Retrieval Beat and `↳ Context restored:` receipt. Never claim context was restored from a branch name alone.
|
|
161
|
+
- Name only unresolved items that could change the next move, state the next outcome briefly, and continue without replaying setup.
|
|
159
162
|
|
|
160
163
|
### Handoff claiming
|
|
161
164
|
|
|
@@ -164,7 +167,7 @@ If `addressed_to_user` handoffs exist and the user is picking one up, create the
|
|
|
164
167
|
bash bin/graph-op.sh claim-handoff "$SESSION_ID" "$HANDOFF_SESSION_ID" 2>/dev/null &
|
|
165
168
|
```
|
|
166
169
|
|
|
167
|
-
**Auto-checkout repos from handoff**:
|
|
170
|
+
**Auto-checkout repos from handoff**: after claiming, if `addressed_rich` carries a non-empty `repoState`, check out each entry's branch in its managed repo:
|
|
168
171
|
|
|
169
172
|
```bash
|
|
170
173
|
PARENT_DIR="$(cd .. && pwd)"
|
|
@@ -177,21 +180,19 @@ if [ -d "$REPO_DIR/.git" ] || [ -f "$REPO_DIR/.git" ]; then
|
|
|
177
180
|
fi
|
|
178
181
|
```
|
|
179
182
|
|
|
180
|
-
Report
|
|
183
|
+
Report `✓ Checked out {branch} in {repo1}, {repo2}`; for a merged-away branch, `◐ {repo}: PR #{N} merged — on {base}`. If `repoState` is absent or empty, skip silently.
|
|
181
184
|
|
|
182
|
-
**Exceptions** — skip branching when
|
|
183
|
-
- The user explicitly created or named a branch themselves
|
|
184
|
-
- Already on a working branch AND the user's intent continues the current branch's topic
|
|
185
|
+
**Exceptions** — skip branching when the user explicitly created or named a branch themselves, or the intent continues the current working branch's topic.
|
|
185
186
|
|
|
186
|
-
**Topic pivot
|
|
187
|
+
**Topic pivot:** work **unrelated** to the current branch's topic gets a new branch (`bin/agent.sh branch --topic "<new topic>"`). Do NOT mix unrelated work on one branch.
|
|
187
188
|
|
|
188
189
|
If still on the configured base branch after two messages, create a branch immediately from whatever context you have.
|
|
189
190
|
|
|
190
191
|
### Branch-guard protocol
|
|
191
192
|
|
|
192
|
-
The `.codex/hooks/branch-guard.js` PreToolUse hook (
|
|
193
|
+
The `.codex/hooks/branch-guard.js` PreToolUse hook (launcher `--enable hooks`) protects project writes on the configured base plus `develop`/`main`/`master`. Its block message is operational guidance — do not interrupt the user with routine Git choices:
|
|
193
194
|
|
|
194
|
-
- **Topic is clear**
|
|
195
|
+
- **Topic is clear** → run `bin/agent.sh branch --topic "<topic>"` automatically, continue in the printed worktree, and say one short sentence so the change is visible — never ask approval for routine branching.
|
|
195
196
|
- **Topic is genuinely ambiguous** → ask only for the topic, using compact numbered options:
|
|
196
197
|
|
|
197
198
|
```text
|
|
@@ -204,7 +205,7 @@ The `.codex/hooks/branch-guard.js` PreToolUse hook (enabled by the launcher via
|
|
|
204
205
|
Wait for the reply, then branch.
|
|
205
206
|
- **The user explicitly requested the protected branch** → that request is consent. Record it with `echo '{branch}' > .egregore-branch-consent`, then retry. Never create the marker merely to silence the hook.
|
|
206
207
|
|
|
207
|
-
Memory, managed-repo, and runtime-state writes
|
|
208
|
+
Memory, managed-repo, and runtime-state writes bypass the project guard — if one triggers it, correct the target/context instead of asking for consent.
|
|
208
209
|
|
|
209
210
|
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.
|
|
210
211
|
|
|
@@ -342,7 +343,7 @@ Always use HTTPS for git operations — `github-auth.sh` handles credential stor
|
|
|
342
343
|
|
|
343
344
|
## Loom Routing
|
|
344
345
|
|
|
345
|
-
Loom routes commands across model tiers on the Claude Code runtime (`loom/routes.json` + `bin/loom.sh` + a model-pinned executor subagent). Codex has no subagent delegation —
|
|
346
|
+
Loom routes commands across model tiers on the Claude Code runtime (`loom/routes.json` + `bin/loom.sh` + a model-pinned executor subagent). Codex has no subagent delegation — commands run inline. Ignore "Loom routing" preambles in skill specs and skip `bin/loom.sh` calls; `loom/` and `.claude/agents/` are Claude-runtime framework files.
|
|
346
347
|
|
|
347
348
|
---
|
|
348
349
|
|
|
@@ -371,6 +372,10 @@ main ← stable (/release)
|
|
|
371
372
|
|
|
372
373
|
Every PR body follows `.claude/context/pr-format.md`, enforced by the `pr-format` CI check regardless of which harness opened it: `## What` (1–4 bullets) + `## Why` (1–3 sentences) always; `## Verification` when the diff touches non-markdown files (how it was checked, or an honest `Not verified — <reason>`); `## Risk`/`## Links` when real; title `type(scope): imperative summary` (advisory). **Never create a PR with an empty body or `--fill`** — write the body and pass it explicitly (`gh pr create --body`, or `bin/agent.sh save --pr-body` for shell agents; the bridge auto-generates a compliant skeleton only as a last resort).
|
|
373
374
|
|
|
375
|
+
### Commit format (all harnesses)
|
|
376
|
+
|
|
377
|
+
Every commit follows `.claude/context/commit-format.md`: subject `type(scope): imperative summary` (≤ 72 chars, aim ≤ 50, lowercase, same grammar and type set as PR titles), body wrapped at 72 explaining what and why — never how, and git trailers on agent-authored commits (`Egregore-Session: <id>` from `.egregore-session-id`, plus the harness `Co-Authored-By` line). Background scripts commit as `chore(<subsystem>): …`, but a commit carrying real work derives its type/scope from the diff — the transport never masks the work. Git-generated messages (merges, reverts, autosquash fixups) keep their native form. Wording for commits and PRs follows `.claude/context/git-language.md`.
|
|
378
|
+
|
|
374
379
|
### Managed Repos
|
|
375
380
|
|
|
376
381
|
Repos in `egregore.json` → `repos[]` are cloned as siblings (`../{repo}/`). Each entry can be a string or `{"name": "...", "description": "..."}`. Match user intent to the right repo using `description`. Same branching strategy. Use `git -C` with absolute paths — never `cd` into repos. `$save` scans all managed repos for uncommitted changes.
|
|
@@ -387,7 +392,7 @@ Repos in `egregore.json` → `repos[]` are cloned as siblings (`../{repo}/`). Ea
|
|
|
387
392
|
|
|
388
393
|
## Command Awareness
|
|
389
394
|
|
|
390
|
-
Codex reserves leading `/` for built-ins, so Egregore workflows are **skills**, not slash commands. Invoke them with the matching `$name` skill token or from natural language intent ("show activity", "make a handoff"). Hand-written native Codex skills: `$activity`, `$handoff`, `$wrap`, `$announce`, `$harvest`, `$the-spiral`, `$dashboard`, `$deep-reflect`, `$quest`, `$invite`, `$ask`, `$save`, `$view`,
|
|
395
|
+
Codex reserves leading `/` for built-ins, so Egregore workflows are **skills**, not slash commands. Invoke them with the matching `$name` skill token or from natural language intent ("show activity", "make a handoff"). Hand-written native Codex skills: `$activity`, `$handoff`, `$wrap`, `$announce`, `$harvest`, `$the-spiral`, `$dashboard`, `$deep-reflect`, `$quest`, `$invite`, `$ask`, `$save`, `$view`, `$scroll`; every other workflow has a generated adapter of the same name. `$save` is the user-facing abstraction for committing, pushing, opening or reusing PRs, and syncing memory — never make users manage git by hand.
|
|
391
396
|
|
|
392
397
|
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.
|
|
393
398
|
|
|
@@ -395,7 +400,7 @@ Invoke commands from user intent — don't wait for the slash. Each command file
|
|
|
395
400
|
**Knowledge** — `$search` `$deep-reflect` `$archive` `$note` `$add` `$meeting` `$ingest` `$scroll` `$mock` `$audit`
|
|
396
401
|
**Identity** — `$me` (view profile or set display name)
|
|
397
402
|
**Coordination** — `$ask` `$quest` `$issue` `$invite` `$delete-user` `$announce`
|
|
398
|
-
**Connectors** — `$notion-connect` (Notion workspace) `$telegram-connect` (Telegram group setup) `$teams-connect` (Microsoft Teams channel setup)
|
|
403
|
+
**Connectors** — `$notion-connect` (Notion workspace) `$telegram-connect` (Telegram group setup) `$teams-connect` (Microsoft Teams channel setup) `$slack-connect` (Slack channel setup)
|
|
399
404
|
**Git** — `$branch` `$commit` `$push` `$pr` `$save` `$review-pr` `$contribute`
|
|
400
405
|
**Spirits** — `$summon` (persistent agent processes)
|
|
401
406
|
**Skills** — `$create-skill` (org-owned skill: scaffold, protect from updates, share)
|
|
@@ -411,7 +416,7 @@ Invoke commands from user intent — don't wait for the slash. Each command file
|
|
|
411
416
|
- Tasks: `$todo` (personal) · `$quest` (team exploration) · `$issue` (something broken)
|
|
412
417
|
- Questions: `$ask [person]` (async) · just ask (agent answers from context)
|
|
413
418
|
- Ingestion: `$ingest <file-or-folder>` (org-scoped corpus intake) · `$ingest meeting` · `$ingest user-interview` · `$ingest google` · ambiguous → ask which type
|
|
414
|
-
- Connectors: `$notion-connect` (Notion workspace) · `$telegram-connect` (Telegram group) · `$teams-connect` (MS Teams channel) · `$ingest` (bring content in) · `$ingest notion` (promote Notion docs)
|
|
419
|
+
- Connectors: `$notion-connect` (Notion workspace) · `$telegram-connect` (Telegram group) · `$teams-connect` (MS Teams channel) · `$slack-connect` (Slack channel) · `$ingest` (bring content in) · `$ingest notion` (promote Notion docs)
|
|
415
420
|
- Identity: `$me` — "who am I", "call me oz"
|
|
416
421
|
- People: `$invite` (add) · `$delete-user` (remove)
|
|
417
422
|
- PRs: `$pr` (create) · `$review-pr` (review)
|
|
@@ -451,8 +456,9 @@ Egregore runs in one of two configurations, set by `mode` in `egregore.json`. De
|
|
|
451
456
|
|
|
452
457
|
**Hard rules in local mode:**
|
|
453
458
|
- Never tell the user to "ask their admin" for credentials. The user IS the admin.
|
|
454
|
-
- Never surface `api_url`, `EGREGORE_API_KEY`, or
|
|
455
|
-
-
|
|
459
|
+
- Never surface `api_url`, `EGREGORE_API_KEY`, or config edits as an upgrade path. Hosted Egregore is not something a user can turn on by adding fields to `egregore.json`.
|
|
460
|
+
- **The one sanctioned upgrade path is `egregore connect`** (the launcher flow: registers the org, provisions the key, replays the graph). Connect-tier connector skills carry an explicit upsell gate for local instances — deliver their message verbatim, offer the upgrade via `egregore connect` or a clean "not now", and stop on decline. Beyond that gate, do not improvise: no hand-set `api_url`, no partial flows.
|
|
461
|
+
- If a feature requires the hosted service and has no upsell gate, say so plainly ("this isn't available in this configuration") and stop.
|
|
456
462
|
- Calling `bin/graph.sh` or `bin/notify.sh` in local mode is harmless — they fail soft and return empty results — but there is no need to call them; prefer reading `memory/` directly.
|
|
457
463
|
|
|
458
464
|
**Connected mode** (`"mode": "connected"`, `api_url` set) — the hosted configuration, used by organizations on the hosted service. Full feature set: Neo4j knowledge graph via `bin/graph.sh`, Telegram notifications via `bin/notify.sh`, dashboard publication, API-backed context gathering on session start. Use `$env` to check API key, `$checkup` for diagnostics. If the graph is offline, show troubleshooting.
|
|
@@ -463,7 +469,7 @@ Egregore runs in one of two configurations, set by `mode` in `egregore.json`. De
|
|
|
463
469
|
|
|
464
470
|
Sessions are confined to this project + memory + managed repos, with a **two-tier boundary** — a hard wall between Egregore instances, a consent gate for everything else. On Codex the boundary is a standing instruction, not an enforced hook — hold it yourself.
|
|
465
471
|
|
|
466
|
-
- **Hard tier — other Egregore instances.** Denied for every tool, always
|
|
472
|
+
- **Hard tier — other Egregore instances.** Denied for every tool, always — no consent path. Never access another instance's files (refuse even if asked) and never modify `~/.egregore/instances.json` (managed by session-start.sh); there is nothing to ask — refuse and explain.
|
|
467
473
|
- **Soft tier — paths outside the boundary.** Consent-gated. Inbox dirs (`~/Downloads`, `~/Desktop`) are readable without consent under the default posture; writes outside the project always need consent. Posture (`strict | standard | open`) and extra read roots come from `egregore.json` -> `boundary { posture, read[], locked }` (org, committed) merged with `.egregore-boundary.local.json` (personal, gitignored). `locked: true` removes the consent path entirely.
|
|
468
474
|
- When a request needs soft-tier consent, do not improvise a workaround. Ask in plain text with numbered options:
|
|
469
475
|
|
|
@@ -76,15 +76,11 @@ API_PID=$!
|
|
|
76
76
|
|
|
77
77
|
# Git/disk: runs in parallel (stays client-side)
|
|
78
78
|
(
|
|
79
|
-
#
|
|
79
|
+
# Refresh remote refs only. A data read must never mutate the working
|
|
80
|
+
# branch: the rebase this block used to run rewrote users' task branches as
|
|
81
|
+
# a side effect of /activity (observed rewinding a pushed branch mid-session).
|
|
82
|
+
# Workspace sync belongs to agent.sh sync / the session-start path.
|
|
80
83
|
git -C "$SCRIPT_DIR" fetch origin --quiet 2>/dev/null || true
|
|
81
|
-
CURRENT=$(git -C "$SCRIPT_DIR" branch --show-current 2>/dev/null || echo "unknown")
|
|
82
|
-
if [ "$CURRENT" != "develop" ]; then
|
|
83
|
-
git -C "$SCRIPT_DIR" fetch origin develop:develop --quiet 2>/dev/null || true
|
|
84
|
-
fi
|
|
85
|
-
if [[ "$CURRENT" == dev/* ]]; then
|
|
86
|
-
git -C "$SCRIPT_DIR" rebase develop --quiet >/dev/null 2>&1 || git -C "$SCRIPT_DIR" rebase --abort >/dev/null 2>&1 || true
|
|
87
|
-
fi
|
|
88
84
|
|
|
89
85
|
# Memory sync
|
|
90
86
|
if [ -d "$SCRIPT_DIR/memory/.git" ] || [ -L "$SCRIPT_DIR/memory" ]; then
|
package/runtime/pi/bin/agent.sh
CHANGED
|
@@ -23,6 +23,15 @@ if [ -f "$SCRIPT_DIR/bin/lib/config.sh" ]; then
|
|
|
23
23
|
# shellcheck source=bin/lib/config.sh
|
|
24
24
|
source "$SCRIPT_DIR/bin/lib/config.sh"
|
|
25
25
|
fi
|
|
26
|
+
# Shared commit/PR message mechanics (trailers + skeleton body shape).
|
|
27
|
+
# shellcheck source=bin/lib/git-message.sh
|
|
28
|
+
. "$SCRIPT_DIR/bin/lib/git-message.sh" 2>/dev/null || true
|
|
29
|
+
type egregore_commit >/dev/null 2>&1 || egregore_commit() {
|
|
30
|
+
local gd="$1" m="$3"; shift 3; git -C "$gd" commit -m "$m" "$@"
|
|
31
|
+
}
|
|
32
|
+
type egregore_pr_skeleton >/dev/null 2>&1 || egregore_pr_skeleton() {
|
|
33
|
+
printf '## What\n%s\n\n## Why\n%s\n\n## Verification\n%s\n\n%s\n' "$1" "$2" "$3" "$4"
|
|
34
|
+
}
|
|
26
35
|
|
|
27
36
|
usage() {
|
|
28
37
|
cat <<'EOF'
|
|
@@ -360,8 +369,11 @@ build_pr_body() {
|
|
|
360
369
|
commits="$(git -C "$SCRIPT_DIR" log --pretty='- %s' "origin/$base..HEAD" 2>/dev/null | head -8)"
|
|
361
370
|
[ -n "$commits" ] || commits="- (commit list unavailable — see the Files tab)"
|
|
362
371
|
stat="$(git -C "$SCRIPT_DIR" diff --shortstat "origin/$base...HEAD" 2>/dev/null | sed 's/^ *//')"
|
|
363
|
-
|
|
364
|
-
"$commits"
|
|
372
|
+
egregore_pr_skeleton \
|
|
373
|
+
"$commits" \
|
|
374
|
+
"Shell-agent session save — topic: $topic. Body auto-generated by bin/agent.sh; pass --pr-body for a hand-written description." \
|
|
375
|
+
"Not verified — auto-generated skeleton; review the diff before merging.${stat:+ ($stat)}" \
|
|
376
|
+
"🤖 Saved via bin/agent.sh"
|
|
365
377
|
}
|
|
366
378
|
|
|
367
379
|
cmd_save() {
|
|
@@ -379,7 +391,7 @@ cmd_save() {
|
|
|
379
391
|
done
|
|
380
392
|
|
|
381
393
|
[ -n "$topic" ] || topic="portable save"
|
|
382
|
-
[ -n "$message" ] || message="
|
|
394
|
+
[ -n "$message" ] || message="chore(save): $topic"
|
|
383
395
|
base="$(resolve_base_branch)" || die "save stopped before Git changes"
|
|
384
396
|
|
|
385
397
|
if [ -d "$MEMORY_DIR" ]; then
|
|
@@ -392,7 +404,7 @@ cmd_save() {
|
|
|
392
404
|
branch="$(ensure_working_branch "$topic")"
|
|
393
405
|
git -C "$SCRIPT_DIR" add -A >/dev/null 2>&1 || die "git add failed"
|
|
394
406
|
if ! git -C "$SCRIPT_DIR" diff --cached --quiet 2>/dev/null; then
|
|
395
|
-
|
|
407
|
+
egregore_commit "$SCRIPT_DIR" "$SCRIPT_DIR" "$message" --quiet || die "git commit failed"
|
|
396
408
|
committed="true"
|
|
397
409
|
fi
|
|
398
410
|
fi
|
|
@@ -415,7 +427,7 @@ cmd_save() {
|
|
|
415
427
|
pr_body="$(cat "$pr_body_file")"
|
|
416
428
|
fi
|
|
417
429
|
[ -n "$pr_body" ] || pr_body="$(build_pr_body "$topic")"
|
|
418
|
-
pr_url="$(gh pr create --base "$base" --head "$branch" --title "$message" --body "$pr_body" 2>/dev/null || true)"
|
|
430
|
+
pr_url="$(gh pr create --base "$base" --head "$branch" --title "${message%%$'\n'*}" --body "$pr_body" 2>/dev/null || true)"
|
|
419
431
|
fi
|
|
420
432
|
fi
|
|
421
433
|
|