create-egregore 0.19.8 → 0.19.11
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/lib/local.js +11 -1
- package/lib/setup.js +33 -0
- package/package.json +1 -1
- package/runtime/codex/.codex/hooks/branch-guard.js +242 -34
- package/runtime/codex/.codex/skills/activity/SKILL.md +18 -6
- package/runtime/codex/.codex/skills/deep-reflect/SKILL.md +90 -55
- package/runtime/codex/.codex/skills/deploy-bridge/SKILL.md +25 -0
- package/runtime/codex/.codex/skills/handoff/SKILL.md +6 -2
- package/runtime/codex/.codex/skills/save/SKILL.md +21 -3
- package/runtime/codex/.codex/skills/scroll/SKILL.md +54 -3
- package/runtime/codex/.codex/skills/task/SKILL.md +25 -0
- package/runtime/codex/.codex/skills/tui-design/SKILL.md +1 -1
- package/runtime/codex/.codex/skills/wrap/SKILL.md +4 -1
- package/runtime/codex/.codex/spec-manifest.json +15 -3
- package/runtime/codex/AGENTS.md +45 -9
- package/runtime/codex/bin/activity-data.sh +1 -1
- package/runtime/codex/bin/agent.sh +66 -23
- package/runtime/codex/bin/attendant.sh +525 -0
- package/runtime/codex/bin/capture-reconcile.sh +67 -0
- package/runtime/codex/bin/capture-run.sh +341 -0
- package/runtime/codex/bin/codex-render-spec.mjs +15 -4
- package/runtime/codex/bin/codex-session-start.sh +45 -3
- package/runtime/codex/bin/codex-skill-render.mjs +23 -4
- package/runtime/codex/bin/graph-op.sh +719 -49
- package/runtime/codex/bin/graph-wal.sh +3 -2
- package/runtime/codex/bin/handoff-run.sh +72 -0
- package/runtime/codex/bin/handoff-save-egregore.sh +51 -11
- package/runtime/codex/bin/index-handoff.sh +26 -17
- package/runtime/codex/bin/ingest-graph.sh +80 -0
- package/runtime/codex/bin/ingest-surface.html +429 -0
- package/runtime/codex/bin/ingest.py +614 -0
- package/runtime/codex/bin/ingest.sh +231 -0
- package/runtime/codex/bin/ingest_graph.py +776 -0
- package/runtime/codex/bin/ingest_surface.py +464 -0
- package/runtime/codex/bin/lib/git-sync.sh +2 -6
- package/runtime/codex/bin/lib/greeting.sh +157 -22
- package/runtime/codex/bin/lib/identity.sh +50 -29
- package/runtime/codex/bin/lib/noncode.sh +31 -0
- package/runtime/codex/bin/person.py +610 -0
- package/runtime/codex/bin/person.sh +448 -0
- package/runtime/codex/bin/session-autosave.sh +184 -0
- package/runtime/codex/bin/session-log.sh +199 -0
- package/runtime/codex/bin/settings.sh +1 -1
- package/runtime/codex/manifest.json +19 -1
- package/runtime/pi/.codex/hooks/branch-guard.js +242 -34
- package/runtime/pi/.codex/skills/activity/SKILL.md +18 -6
- package/runtime/pi/.codex/skills/deep-reflect/SKILL.md +90 -55
- package/runtime/pi/.codex/skills/deploy-bridge/SKILL.md +25 -0
- package/runtime/pi/.codex/skills/handoff/SKILL.md +6 -2
- package/runtime/pi/.codex/skills/save/SKILL.md +21 -3
- package/runtime/pi/.codex/skills/scroll/SKILL.md +54 -3
- package/runtime/pi/.codex/skills/task/SKILL.md +25 -0
- package/runtime/pi/.codex/skills/tui-design/SKILL.md +1 -1
- package/runtime/pi/.codex/skills/wrap/SKILL.md +4 -1
- package/runtime/pi/.codex/spec-manifest.json +15 -3
- package/runtime/pi/.pi/APPEND_SYSTEM.md +41 -5
- package/runtime/pi/.pi/extensions/egregore.ts +98 -8
- package/runtime/pi/.pi/spec-manifest.json +2 -2
- package/runtime/pi/AGENTS.md +45 -9
- package/runtime/pi/bin/activity-data.sh +1 -1
- package/runtime/pi/bin/agent.sh +66 -23
- package/runtime/pi/bin/attendant.sh +525 -0
- package/runtime/pi/bin/capture-reconcile.sh +67 -0
- package/runtime/pi/bin/capture-run.sh +341 -0
- package/runtime/pi/bin/codex-render-spec.mjs +15 -4
- package/runtime/pi/bin/codex-session-start.sh +45 -3
- package/runtime/pi/bin/codex-skill-render.mjs +23 -4
- package/runtime/pi/bin/graph-op.sh +719 -49
- package/runtime/pi/bin/graph-wal.sh +3 -2
- package/runtime/pi/bin/handoff-run.sh +72 -0
- package/runtime/pi/bin/handoff-save-egregore.sh +51 -11
- package/runtime/pi/bin/index-handoff.sh +26 -17
- package/runtime/pi/bin/ingest-graph.sh +80 -0
- package/runtime/pi/bin/ingest-surface.html +429 -0
- package/runtime/pi/bin/ingest.py +614 -0
- package/runtime/pi/bin/ingest.sh +231 -0
- package/runtime/pi/bin/ingest_graph.py +776 -0
- package/runtime/pi/bin/ingest_surface.py +464 -0
- package/runtime/pi/bin/lib/git-sync.sh +2 -6
- package/runtime/pi/bin/lib/greeting.sh +157 -22
- package/runtime/pi/bin/lib/identity.sh +50 -29
- package/runtime/pi/bin/lib/noncode.sh +31 -0
- package/runtime/pi/bin/person.py +610 -0
- package/runtime/pi/bin/person.sh +448 -0
- package/runtime/pi/bin/pi-branch-policy.mjs +164 -4
- package/runtime/pi/bin/pi-product-workflows.mjs +31 -2
- package/runtime/pi/bin/publish-artifact.sh +14 -0
- package/runtime/pi/bin/session-autosave.sh +184 -0
- package/runtime/pi/bin/session-log.sh +199 -0
- package/runtime/pi/bin/settings.sh +274 -0
- package/runtime/pi/manifest.json +20 -1
|
@@ -1,74 +1,109 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: deep-reflect
|
|
3
|
-
description:
|
|
3
|
+
description: Deep research over the Egregore org memory — multi-hop, evidence-verified synthesis of what the org collectively knows — when the user invokes /deep-reflect or $deep-reflect.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Egregore Deep Reflect
|
|
6
|
+
# Egregore Deep Reflect (v4)
|
|
7
7
|
|
|
8
|
-
Native Codex Egregore skill.
|
|
9
|
-
|
|
8
|
+
Native Codex Egregore skill. Ask the org's memory a question and return a
|
|
9
|
+
verified, cited synthesis of what it collectively knows — including what it
|
|
10
|
+
doesn't. `/reflect` captures user thought; `/deep-reflect` researches what the
|
|
11
|
+
org already knows.
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
Full contracts live in `.claude/skills/deep-reflect/` (`SKILL.md` entry,
|
|
14
|
+
`RESEARCH.md` engine, `ROLES.md` agent roles, `REPORT.md` output). Follow them;
|
|
15
|
+
this file is the Codex-runtime adapter.
|
|
12
16
|
|
|
13
|
-
|
|
14
|
-
- `focused ...`: focused topic mode.
|
|
15
|
-
- `quick ...` or `category: content`: quick mode.
|
|
17
|
+
## Modes
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
- Question (default): interrogative or bare-topic arguments → "what does the
|
|
20
|
+
org know about X?"
|
|
21
|
+
- Cross-ref: "cross-reference this" / a declarative insight → "how does this
|
|
22
|
+
insight sit against existing memory?"
|
|
23
|
+
- Depth: `--brief` (1 hop wave), standard (≤3), `--deep` (≤5). Default is
|
|
24
|
+
dynamic from the corpus probe.
|
|
20
25
|
|
|
21
26
|
## Flow
|
|
22
27
|
|
|
23
|
-
1. Check `egregore.json` mode
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
28
|
+
1. Check `egregore.json` mode FIRST. Local mode: full engine over files; never
|
|
29
|
+
call graph, batch-graph, or notification scripts; zero graph vocabulary in
|
|
30
|
+
output. Connected: graph adds hop rails and writeback, every graph call
|
|
31
|
+
non-fatal (`2>/dev/null || true`).
|
|
32
|
+
2. FRAME: corpus probe — 2× `bin/agent.sh search "$TOPIC" --fast -n 20` with
|
|
33
|
+
different wordings + `bin/artifacts.sh find "$TOPIC"` +
|
|
34
|
+
`grep -ril "$TOPIC" memory/knowledge/ memory/handoffs/ memory/artifacts/`.
|
|
35
|
+
N = the union of unique paths; set the wave budget from N per
|
|
36
|
+
`RESEARCH.md` §Budget; decompose the question into 2-4 sub-questions;
|
|
37
|
+
print a plan line (`Researching: … · ~N relevant docs · budget M waves ·
|
|
38
|
+
est ~X min`). Under ~5 relevant docs: say memory is too thin and offer
|
|
39
|
+
`/reflect` or `/harvest` instead of faking research. If search errors or
|
|
40
|
+
returns nothing while grep hits, rely on grep and note "recall degraded".
|
|
41
|
+
3. SEED: check `memory/knowledge/research/` for prior runs on the topic —
|
|
42
|
+
their cited artifacts (frontmatter `artifacts_cited`, older reports use
|
|
43
|
+
`artifacts_consulted`; resolve filename stems with `find`) are pre-warmed
|
|
44
|
+
leads, and their `null_regions` gaps get re-audited. Build a frontier of
|
|
45
|
+
≤12 docs from search probes, frontmatter topic/quest greps, and index
|
|
46
|
+
ledgers.
|
|
47
|
+
4. HOP WAVES: the Codex runtime has no Workflow tool — run the foreground
|
|
48
|
+
staged path from `ROLES.md`: per wave, read 8-12 docs (subagents if the
|
|
49
|
+
session offers them, otherwise staged single-model passes), extract
|
|
50
|
+
claims-with-verbatim-excerpts and typed leads (doc links, quests, people,
|
|
51
|
+
sessions, topic terms, named absences). Dedup against the seen-set, score
|
|
52
|
+
leads, hop until saturation per `RESEARCH.md` (coverage on every
|
|
53
|
+
sub-question plus low novelty or zero yield; or budget).
|
|
54
|
+
5. PATTERN: two de-correlated passes. Without subagents true blindness is
|
|
55
|
+
impossible — degrade deliberately: run the TENSION pass FIRST (grouped by
|
|
56
|
+
topic), then the convergence pass (chronological), so tension-finding is
|
|
57
|
+
never anchored by an existing convergence story. Disagreement between
|
|
58
|
+
passes is a finding, never averaged away.
|
|
59
|
+
6. VERIFY: for every claim, whitespace-normalize the excerpt and re-find it in
|
|
60
|
+
the cited file (miss = miscite = kill; supported paraphrase = correct the
|
|
61
|
+
excerpt). The mechanical re-check survives self-verification — it is a
|
|
62
|
+
grep, not a judgment. Re-attack every gap claim with one extra probe; a
|
|
63
|
+
found doc refutes the gap and joins the ledger. Evidence older than ~90
|
|
64
|
+
days gets one `--fast` newer-artifact probe. Report the kill count. When
|
|
65
|
+
the verifying context is the same one that made the claims, mark the
|
|
66
|
+
report's provenance `verification: self-checked`.
|
|
67
|
+
7. SYNTHESIZE + PRESENT: stance, not summary — answer first, then ◆ primary /
|
|
68
|
+
◇ secondary findings with `memory/...` path citations, tensions, and "what
|
|
69
|
+
memory doesn't hold" (gaps + the probes that prove them). Confidence is
|
|
70
|
+
derived from evidence structure (verified + ≥3 independent sources = high;
|
|
71
|
+
single-source always labeled). Register: analyst, not critic.
|
|
72
|
+
8. CAPTURE (user-gated): Save (default) / Edit first / File follow-ups /
|
|
73
|
+
Skip. On Save write `memory/knowledge/research/YYYY-MM-DD-author-slug.md`
|
|
74
|
+
with frontmatter (question, mode, stop_reason, waves, docs_read,
|
|
75
|
+
claims_killed, builds_on, artifacts_consulted, artifacts_cited,
|
|
76
|
+
null_regions), then connected-mode best-effort graph writes per the main
|
|
77
|
+
`REPORT.md` §Writeback (MERGE with filePath — do NOT use
|
|
78
|
+
`graph-op.sh register-artifact`; `RELATES_TO`/`TENSION_WITH` for verified
|
|
79
|
+
cross-ref claims only), then
|
|
80
|
+
`bin/agent.sh save --message "Deep research: $TOPIC" --topic "$TOPIC"`.
|
|
81
|
+
On Skip: nothing is written except the local run ledger under
|
|
82
|
+
`.egregore/research-runs/`. Render the TUI box AFTER the gate, reflecting
|
|
83
|
+
the actual outcome.
|
|
52
84
|
|
|
53
85
|
## Output
|
|
54
86
|
|
|
55
|
-
|
|
56
|
-
recommended next action. Keep secondary and ambient signals short.
|
|
57
|
-
|
|
58
|
-
Structured UX parity is required. Then render the Egregore deep-reflect
|
|
59
|
-
confirmation TUI:
|
|
87
|
+
Render the Egregore deep-reflect confirmation TUI after the capture gate:
|
|
60
88
|
|
|
61
|
-
-
|
|
62
|
-
- Header:
|
|
63
|
-
- Body:
|
|
64
|
-
|
|
65
|
-
- Footer: saved/pushed state
|
|
66
|
-
|
|
67
|
-
-
|
|
89
|
+
- 72-column outer box, standard top/separator/content/bottom lines only.
|
|
90
|
+
- Header: `◈ DEEP REFLECT`, author, date.
|
|
91
|
+
- Body: question, ◆/◇ finding counts, confidence, waves · docs read · cited ·
|
|
92
|
+
claims cut in verification.
|
|
93
|
+
- Footer: actual saved/pushed state; say "graphed" only if the graph write
|
|
94
|
+
succeeded; in local mode omit graph language entirely.
|
|
95
|
+
- Structured UX parity is required: preserve the rendered deep-reflect TUI
|
|
96
|
+
box, no preamble, no prose-only replacement, and no raw search or graph
|
|
97
|
+
output.
|
|
98
|
+
- Never show raw graph JSON; never replace the box with prose.
|
|
68
99
|
|
|
69
100
|
## Rules
|
|
70
101
|
|
|
71
|
-
-
|
|
72
|
-
|
|
73
|
-
-
|
|
102
|
+
- Search budget: at most ONE non-`--fast` search probe per run (seed only);
|
|
103
|
+
`--fast` everywhere else. Count result blocks, never the banner hit count.
|
|
104
|
+
- No claim without a verbatim excerpt that survives re-finding in the file.
|
|
105
|
+
- Absence is a first-class finding — cite the probes that prove it.
|
|
106
|
+
- Don't manufacture significance: "memory holds nothing structural on this"
|
|
107
|
+
is a valid report.
|
|
108
|
+
- At most ONE clarifying question before the run, plus the capture gate.
|
|
74
109
|
- Do not use Claude Code commands.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: deploy-bridge
|
|
3
|
+
description: 'Deploy the Telegram bridge (egregore_bridge.py) to the VPS agent box and verify it comes back healthy. Org-internal — the bridge does NOT auto-deploy from develop.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- generated-by: bin/codex-sync-skills.sh -->
|
|
7
|
+
|
|
8
|
+
# Egregore deploy-bridge 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/deploy-bridge/SKILL.md` for the workflow details.
|
|
19
|
+
2. Run the referenced `bin/` scripts directly from Codex.
|
|
20
|
+
3. Treat graph, publish, and notify steps as best-effort unless that workflow
|
|
21
|
+
explicitly says they are required.
|
|
22
|
+
4. Keep local-mode behavior filesystem-first and avoid graph or notification
|
|
23
|
+
calls when `egregore.json` declares `"mode": "local"`.
|
|
24
|
+
5. Never call the deprecated `egregore-handoff` CLI for Egregore project
|
|
25
|
+
handoffs.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: handoff
|
|
3
|
-
description: Create an internal Egregore team handoff when the user invokes /handoff or $handoff,
|
|
3
|
+
description: Create an internal Egregore team handoff when the user invokes /handoff or $handoff, asks to hand off work, or wants to pass context to a teammate or future self.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Egregore Handoff
|
|
@@ -11,6 +11,10 @@ the Egregore scripts. External runnable packets are emissaries; if the user
|
|
|
11
11
|
asks for one or provides an `egregore.xyz/emissary/e/` link, use the emissary
|
|
12
12
|
tooling instead.
|
|
13
13
|
|
|
14
|
+
`/handoff` is pure addressed capture. Do not triage incoming handoffs here;
|
|
15
|
+
route “show/close my handoffs” to `$activity`. Personal session closure without
|
|
16
|
+
an addressed recipient belongs to `$wrap`.
|
|
17
|
+
|
|
14
18
|
## Flow
|
|
15
19
|
|
|
16
20
|
1. Run `bin/agent.sh sync`.
|
|
@@ -29,7 +33,7 @@ tooling instead.
|
|
|
29
33
|
|
|
30
34
|
```bash
|
|
31
35
|
TMPDIR="$(mktemp -d -t codex-handoff-XXXXXX)"
|
|
32
|
-
TMPDIR="$TMPDIR" bash bin/
|
|
36
|
+
TMPDIR="$TMPDIR" bash bin/capture-run.sh --mode addressed --author "$AUTHOR" --topic "$TOPIC" ${RECIPIENT_ARG} < "$BODY_FILE"
|
|
33
37
|
```
|
|
34
38
|
|
|
35
39
|
Use `--recipient "$RECIPIENT"` only when a clear teammate or future-self
|
|
@@ -17,11 +17,29 @@ which branch, commit, push, pull request, or memory sync steps are required.
|
|
|
17
17
|
```bash
|
|
18
18
|
git status --short
|
|
19
19
|
git status --short memory 2>/dev/null || true
|
|
20
|
-
git branch --show-current
|
|
20
|
+
BRANCH=$(git branch --show-current)
|
|
21
|
+
AHEAD=0
|
|
22
|
+
OPEN_PR=""
|
|
23
|
+
case "$BRANCH" in
|
|
24
|
+
dev/*|feature/*|bugfix/*)
|
|
25
|
+
git fetch origin develop --quiet 2>/dev/null || true
|
|
26
|
+
AHEAD=$(git rev-list --count "origin/develop..HEAD" 2>/dev/null || echo 0)
|
|
27
|
+
if command -v gh >/dev/null 2>&1; then
|
|
28
|
+
OPEN_PR=$(gh pr list --head "$BRANCH" --base develop --state open \
|
|
29
|
+
--json url --jq '.[0].url // empty' 2>/dev/null || true)
|
|
30
|
+
fi
|
|
31
|
+
;;
|
|
32
|
+
esac
|
|
21
33
|
```
|
|
22
34
|
|
|
23
|
-
3.
|
|
24
|
-
|
|
35
|
+
3. A clean working tree alone does **not** mean the work is fully saved:
|
|
36
|
+
- If there are repo or memory changes, continue.
|
|
37
|
+
- If the task branch is ahead of `origin/develop` and `OPEN_PR` is empty,
|
|
38
|
+
continue even when the tree is clean. The bridge must push any committed
|
|
39
|
+
work and create the missing PR.
|
|
40
|
+
- Stop with "everything is already saved" only when there are no repo or
|
|
41
|
+
memory changes and either the branch has no commits to integrate
|
|
42
|
+
(`AHEAD=0`) or an open integration PR already exists.
|
|
25
43
|
4. Synthesize:
|
|
26
44
|
- a short topic from the work,
|
|
27
45
|
- a clear commit message,
|
|
@@ -18,7 +18,7 @@ small fork. A scroll requires all three legs: face, harvest, and update loop.
|
|
|
18
18
|
## Structured UX parity
|
|
19
19
|
|
|
20
20
|
The browser artifact is the primary output. Preserve both tabs, deep links from
|
|
21
|
-
honest costs into decisions, the versioned copydock
|
|
21
|
+
honest costs into decisions, the versioned copydock return block, stable URL, and local
|
|
22
22
|
source path. Do not substitute a prose-only summary or expose raw publish output.
|
|
23
23
|
|
|
24
24
|
## Route the invocation
|
|
@@ -121,13 +121,64 @@ the same `--id`; never mint a new URL for an update. In local mode, publishing
|
|
|
121
121
|
is unavailable: open the file locally and report the source path without
|
|
122
122
|
suggesting configuration changes.
|
|
123
123
|
|
|
124
|
-
Add the URL or local path, source location, version, and
|
|
124
|
+
Add the URL or local path, source location, version, and return-block tag to the
|
|
125
125
|
relevant quest's log/artifacts tables. If no quest is relevant, keep the source
|
|
126
126
|
path as the durable record and state it.
|
|
127
127
|
|
|
128
|
+
## Creator gate — before any absorb
|
|
129
|
+
|
|
130
|
+
The scroll record `memory/scrolls/<slug>.md` names `creator: <person-slug>` and
|
|
131
|
+
optionally `trusted: [<person-slug>, …]`. A record missing `creator:` is
|
|
132
|
+
backfilled from unambiguous existing attribution, otherwise ask the user once
|
|
133
|
+
and write it — never silently default the gate open.
|
|
134
|
+
|
|
135
|
+
Derive the paster from the session person (`.egregore-state.json`, then git
|
|
136
|
+
config) — never from the return block's self-declared `respondent:` line, which
|
|
137
|
+
is attribution metadata, not an authorization credential.
|
|
138
|
+
|
|
139
|
+
If the paster is not the creator and not in `trusted:`, the return is **gated**:
|
|
140
|
+
|
|
141
|
+
1. Append a `turn-received` event to `memory/scrolls/.events/<slug>.jsonl`
|
|
142
|
+
(create the file if absent). Event ids are append-if-absent and MUST match
|
|
143
|
+
the Claude corpus exactly — both runtimes share one event log:
|
|
144
|
+
`turn.id = respondent + '|' + base_version + '|' + date + '|' + digest`;
|
|
145
|
+
digest = FNV-1a 32-bit hex over the UTF-8 bytes of
|
|
146
|
+
`JSON.stringify([respondent, String(base_version), date, sortedAnswers,
|
|
147
|
+
sortedOpens])` where `sortedAnswers` = answers sorted by fork id, each
|
|
148
|
+
mapped to the tuple `[fork, pick-or-UNDECIDED, note-or-empty]` (labels are
|
|
149
|
+
excluded), and `sortedOpens` = opens sorted by prompt id, each mapped to
|
|
150
|
+
`[prompt, text-or-UNDECIDED]`; every string is NFC-normalized and
|
|
151
|
+
CRLF→LF-normalized before hashing. Record `submitted_by: <paster>` on the
|
|
152
|
+
event (event-log metadata only — never projected into a published ledger)
|
|
153
|
+
and `merged_into: "pending"`.
|
|
154
|
+
2. Do NOT absorb: no `memory/knowledge/decisions/` writes, no spec/plan edits,
|
|
155
|
+
no face rewrite, no version bump, no republish of new content. Republishing
|
|
156
|
+
the unchanged current version to acknowledge the turn is allowed and appends
|
|
157
|
+
no version event.
|
|
158
|
+
3. Notify the creator — connected: `bash bin/notify.sh send <creator>
|
|
159
|
+
"<paster> answered your scroll <slug> (vN): <digest> — pending your review"`;
|
|
160
|
+
local: write an addressed handoff in `memory/handoffs/` naming the scroll,
|
|
161
|
+
paster, base version, digest, and the dispositions below. The contributor
|
|
162
|
+
may also send the artifact link directly.
|
|
163
|
+
4. Report the gated state and stop.
|
|
164
|
+
|
|
165
|
+
**Creator review.** The creator disposes in chat: **accept** (absorb into the
|
|
166
|
+
next version), **decline — <reason>** (mandatory nonblank note; refuse a
|
|
167
|
+
decline without one), per-answer overrides (top-level disposition is the
|
|
168
|
+
default, listed answers override; a turn with zero effectively accepted answers
|
|
169
|
+
is a plain decline; a zero-answer turn takes the top-level disposition), or
|
|
170
|
+
**synthesize** (compose one proposal from all pending turns — consensus
|
|
171
|
+
decides, conflicts become new explicit forks — and publish only on creator
|
|
172
|
+
approval). Every disposition appends `turn-reviewed`
|
|
173
|
+
`{type, turn, disposition: accepted|declined, by, date, note?, answers?}` with
|
|
174
|
+
id `review|<turn.id>` before any composition. An accepted turn stays pending
|
|
175
|
+
until a version actually absorbs it. Declined turns are never absorbed, stay
|
|
176
|
+
attributed in the log, and their reason travels with them. The creator's own
|
|
177
|
+
returns and trusted respondents keep the immediate loop below.
|
|
178
|
+
|
|
128
179
|
## Update loop
|
|
129
180
|
|
|
130
|
-
On a returned
|
|
181
|
+
On a returned block (creator or trusted paster — gated returns stop above):
|
|
131
182
|
|
|
132
183
|
1. **Absorb.** Parse Q/O lines and notes. Write durable decisions with their
|
|
133
184
|
reasoning to `memory/knowledge/decisions/`, update the underlying spec or
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
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.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- generated-by: bin/codex-sync-skills.sh -->
|
|
7
|
+
|
|
8
|
+
# Egregore task 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/task/SKILL.md` for the workflow details.
|
|
19
|
+
2. Run the referenced `bin/` scripts directly from Codex.
|
|
20
|
+
3. Treat graph, publish, and notify steps as best-effort unless that workflow
|
|
21
|
+
explicitly says they are required.
|
|
22
|
+
4. Keep local-mode behavior filesystem-first and avoid graph or notification
|
|
23
|
+
calls when `egregore.json` declares `"mode": "local"`.
|
|
24
|
+
5. Never call the deprecated `egregore-handoff` CLI for Egregore project
|
|
25
|
+
handoffs.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: tui-design
|
|
3
|
-
description: '
|
|
3
|
+
description: 'TUI Design System for Egregore slash commands. Use when designing or modifying any command''s terminal output to ensure visual consistency. Triggers on: TUI, terminal output, box drawing, command output formatting, sigils, section markers. Do NOT use for browser rendering (use dark-mode) or external prose (use egregore-voice).'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
<!-- generated-by: bin/codex-sync-skills.sh -->
|
|
@@ -6,7 +6,10 @@ description: Wrap an Egregore session when the user invokes /wrap or $wrap, or s
|
|
|
6
6
|
# Egregore Wrap
|
|
7
7
|
|
|
8
8
|
Native Codex Egregore skill. Use this inside an Egregore checkout with
|
|
9
|
-
`bin/agent.sh`.
|
|
9
|
+
`bin/agent.sh`. The command routes through `bin/capture-run.sh --mode personal`.
|
|
10
|
+
It writes the personal record first, appends graph and handoff-completion events
|
|
11
|
+
to the local WAL, and reconciles them detached; do not wait for or repeat that
|
|
12
|
+
background work.
|
|
10
13
|
|
|
11
14
|
## Flow
|
|
12
15
|
|
|
@@ -14,6 +14,18 @@
|
|
|
14
14
|
"sourceHash": "ddcbc0083aff",
|
|
15
15
|
"note": "Kept; /update, /contribute, /save tokens rendered as $skill tokens."
|
|
16
16
|
},
|
|
17
|
+
{
|
|
18
|
+
"section": "Cross-Runtime Compatibility",
|
|
19
|
+
"action": "keep",
|
|
20
|
+
"sourceHash": "75d02e2603f5",
|
|
21
|
+
"note": "Kept verbatim — framework parity applies equally to Claude Code, Codex, and Pi."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"section": "Voice",
|
|
25
|
+
"action": "keep",
|
|
26
|
+
"sourceHash": "af73d4eaa7cd",
|
|
27
|
+
"note": "Kept — all runtimes can consult the shared voice rules and register-specific skills."
|
|
28
|
+
},
|
|
17
29
|
{
|
|
18
30
|
"section": "On Launch — MANDATORY FIRST ACTION",
|
|
19
31
|
"action": "replace",
|
|
@@ -23,7 +35,7 @@
|
|
|
23
35
|
{
|
|
24
36
|
"section": "After Greeting — BRANCH ON FIRST RESPONSE",
|
|
25
37
|
"action": "replace",
|
|
26
|
-
"sourceHash": "
|
|
38
|
+
"sourceHash": "bce266fb848b",
|
|
27
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)."
|
|
28
40
|
},
|
|
29
41
|
{
|
|
@@ -35,7 +47,7 @@
|
|
|
35
47
|
{
|
|
36
48
|
"section": "Knowledge Graph",
|
|
37
49
|
"action": "keep",
|
|
38
|
-
"sourceHash": "
|
|
50
|
+
"sourceHash": "b5d9a149f1a6",
|
|
39
51
|
"note": "Kept verbatim — bin/graph.sh is runtime-neutral."
|
|
40
52
|
},
|
|
41
53
|
{
|
|
@@ -83,7 +95,7 @@
|
|
|
83
95
|
{
|
|
84
96
|
"section": "Command Awareness",
|
|
85
97
|
"action": "keep",
|
|
86
|
-
"sourceHash": "
|
|
98
|
+
"sourceHash": "ce5eb3015427",
|
|
87
99
|
"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."
|
|
88
100
|
},
|
|
89
101
|
{
|
package/runtime/codex/AGENTS.md
CHANGED
|
@@ -96,6 +96,24 @@ When a user reports broken or missing framework behavior, the first question is
|
|
|
96
96
|
|
|
97
97
|
---
|
|
98
98
|
|
|
99
|
+
## Cross-Runtime Compatibility
|
|
100
|
+
|
|
101
|
+
Framework behavior must work across Claude Code, Codex, and Pi Egregores. Put
|
|
102
|
+
shared mechanics in runtime-neutral `bin/` scripts; keep `.claude/`, `.codex/`,
|
|
103
|
+
and `.pi/` as thin adapters to those mechanics. When changing startup, session
|
|
104
|
+
lifecycle, capture, skills, or commands, trace all three runtime entry points
|
|
105
|
+
and add or update a parity test. Do not call a framework change complete based
|
|
106
|
+
on one runtime alone. Regenerate derived Codex and Pi specifications or runtime
|
|
107
|
+
bundles whenever their sources change.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Voice
|
|
112
|
+
|
|
113
|
+
Egregore's voice is governed by `.claude/rules/voice-bedrock.md` (always loaded). Register-specific skills: `egregore-voice` (external), `product-voice` (internal UX), `character-v4` (encounters), `alpha-openers` (outreach). See voice-bedrock for the full register map.
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
99
117
|
## On Launch — MANDATORY FIRST ACTION
|
|
100
118
|
|
|
101
119
|
The `egregore` launcher renders the Egregore startup card (identity, team momentum, and pending work) via `bin/codex-session-start.sh` before Codex starts, and installs project skills. Do not rerun startup checks and do not 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 to it. To re-show the card, run `bash bin/codex-session-start.sh --card`.
|
|
@@ -146,19 +164,22 @@ If on develop after two messages, create a branch immediately from whatever cont
|
|
|
146
164
|
|
|
147
165
|
### Branch-guard protocol
|
|
148
166
|
|
|
149
|
-
The `.codex/hooks/branch-guard.js` PreToolUse hook (enabled by the launcher via `--enable hooks`)
|
|
167
|
+
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:
|
|
150
168
|
|
|
151
|
-
- **Topic is
|
|
152
|
-
- **Topic is ambiguous**
|
|
169
|
+
- **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.
|
|
170
|
+
- **Topic is genuinely ambiguous** → ask only for the topic, using compact numbered options:
|
|
153
171
|
|
|
154
172
|
```text
|
|
155
|
-
|
|
173
|
+
What should I call this work?
|
|
156
174
|
1. <suggested slug from context>
|
|
157
175
|
2. <alternative slug>
|
|
158
176
|
3. Other: (name it)
|
|
159
177
|
```
|
|
160
178
|
|
|
161
179
|
Wait for the reply, then branch.
|
|
180
|
+
- **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.
|
|
181
|
+
|
|
182
|
+
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.
|
|
162
183
|
|
|
163
184
|
If this Codex build does not support hooks, follow the same discipline as a standing instruction: never write or commit on develop/main/master.
|
|
164
185
|
|
|
@@ -179,7 +200,22 @@ In connected mode, infrastructure credentials (Neo4j, Telegram) live on the API
|
|
|
179
200
|
|
|
180
201
|
## Knowledge Graph
|
|
181
202
|
|
|
182
|
-
**Connected mode only.**
|
|
203
|
+
**Connected mode only.** For the following intents, the named read must be the
|
|
204
|
+
first retrieval action. Run the exact command with its safe default limit before
|
|
205
|
+
opening files, running broad grep, inspecting `graph-op.sh`, or writing Cypher:
|
|
206
|
+
|
|
207
|
+
- current work addressed to someone → `bash bin/graph-op.sh open-handoffs "<user>"`
|
|
208
|
+
- unanswered questions for someone → `bash bin/graph-op.sh pending-questions "<user>"`
|
|
209
|
+
- handoff → implementation → branch/PR/direction → `bash bin/graph-op.sh lineage "<topic>"`
|
|
210
|
+
- company/person/topic across meetings → `bash bin/graph-op.sh meeting-history "<entity-or-topic>"`
|
|
211
|
+
|
|
212
|
+
A question about calls, meetings, transcripts, demos, or how a conversation
|
|
213
|
+
evolved is always `meeting-history` intent when it names a company, person, or
|
|
214
|
+
topic—even when it does not ask for "current" or "live" state. Pass the shortest
|
|
215
|
+
discriminative entity or topic (for example, `meeting-history "42CAP"`), not the
|
|
216
|
+
whole question.
|
|
217
|
+
|
|
218
|
+
Run `catalog` only when the route is unclear. Named reads return bounded stable fields and exact canonical `evidencePath` pointers; open only the returned files needed to answer. When a read reports partial coverage, use `unprojectedPaths` rather than claiming those files are represented in the graph. Use `bin/graph.sh` for unsupported Neo4j queries and never construct curl calls directly. See DEVELOPMENT.md §1 for the schema. In local mode there is no graph; read `memory/` directly.
|
|
183
219
|
|
|
184
220
|
---
|
|
185
221
|
|
|
@@ -268,13 +304,13 @@ Invoke commands from user intent — don't wait for the slash. Each command file
|
|
|
268
304
|
**Knowledge** — `$search` `$deep-reflect` `$archive` `$note` `$add` `$meeting` `$ingest` `$scroll`
|
|
269
305
|
**Identity** — `$me` (view profile or set display name)
|
|
270
306
|
**Coordination** — `$ask` `$quest` `$issue` `$invite` `$delete-user` `$announce`
|
|
271
|
-
**Connectors** — `$telegram-connect` (Telegram group setup)
|
|
307
|
+
**Connectors** — `$telegram-connect` (Telegram group setup) `$teams-connect` (Microsoft Teams channel setup)
|
|
272
308
|
**Git** — `$branch` `$commit` `$push` `$pr` `$save` `$review-pr` `$contribute`
|
|
273
309
|
**Spirits** — `$summon` (persistent agent processes)
|
|
274
310
|
**Infra** — `$setup` `$update` `$pull` `$env` `$infra` `$sync-repos` `$release` `$checkup`
|
|
275
311
|
|
|
276
312
|
**Disambiguation:**
|
|
277
|
-
- Knowledge: `$reflect` (share-ready) · `$note` (half-baked) · `$deep-reflect` (cross-
|
|
313
|
+
- Knowledge: `$reflect` (share-ready) · `$note` (half-baked) · `$deep-reflect` (deep research over memory — questions AND cross-referencing) · `$archive` (AI patterns)
|
|
278
314
|
- Finding things — the retrieval layers: **Grep/ls** (Claude Code / Codex file ops — always available, OSS) · **`bin/graph.sh`** (indexed relevance + relationships/status — paid). Use grep proactively; the graph deepens it when connected. (Semantic `$search` is dormant — evals showed it only pays off on massive unstructured data.)
|
|
279
315
|
- 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.
|
|
280
316
|
- Artifacts with questions: `$scroll` (living paper + embedded harvest, updates in place) · `$view` (static render) · `$harvest` (elicitation, no published face)
|
|
@@ -282,8 +318,8 @@ Invoke commands from user intent — don't wait for the slash. Each command file
|
|
|
282
318
|
- Ending: `$wrap` (personal closure) · `$handoff` (notes for others) · `$save` (still working)
|
|
283
319
|
- Tasks: `$todo` (personal) · `$quest` (team exploration) · `$issue` (something broken)
|
|
284
320
|
- Questions: `$ask [person]` (async) · just ask (agent answers from context)
|
|
285
|
-
- Ingestion: `$ingest meeting` · `$ingest user-interview` · `$ingest google` · ambiguous → ask which type
|
|
286
|
-
- Connectors: `$telegram-connect` (Telegram group) · `$ingest` (bring content in)
|
|
321
|
+
- Ingestion: `$ingest <file-or-folder>` (org-scoped corpus intake) · `$ingest meeting` · `$ingest user-interview` · `$ingest google` · ambiguous → ask which type
|
|
322
|
+
- Connectors: `$telegram-connect` (Telegram group) · `$teams-connect` (MS Teams channel) · `$ingest` (bring content in)
|
|
287
323
|
- Identity: `$me` — "who am I", "call me oz"
|
|
288
324
|
- People: `$invite` (add) · `$delete-user` (remove)
|
|
289
325
|
- PRs: `$pr` (create) · `$review-pr` (review)
|
|
@@ -9,7 +9,7 @@ trap "rm -rf $TMPDIR" EXIT
|
|
|
9
9
|
|
|
10
10
|
# --- Read config ---
|
|
11
11
|
API_URL=$(jq -r '.api_url // empty' "$SCRIPT_DIR/egregore.json" 2>/dev/null)
|
|
12
|
-
API_KEY
|
|
12
|
+
API_KEY="${EGREGORE_API_KEY:-$(grep '^EGREGORE_API_KEY=' "$SCRIPT_DIR/.env" 2>/dev/null | cut -d'=' -f2-)}"
|
|
13
13
|
ORG=$(jq -r '.org_name // "Egregore"' "$SCRIPT_DIR/egregore.json" 2>/dev/null || echo "Egregore")
|
|
14
14
|
DATE=$(date '+%b %d')
|
|
15
15
|
|