create-egregore 0.19.7 → 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.
Files changed (92) hide show
  1. package/assets/egregore-launcher.js +188 -295
  2. package/lib/local.js +11 -1
  3. package/lib/setup.js +33 -0
  4. package/package.json +1 -1
  5. package/runtime/codex/.codex/hooks/branch-guard.js +242 -34
  6. package/runtime/codex/.codex/skills/activity/SKILL.md +18 -6
  7. package/runtime/codex/.codex/skills/deep-reflect/SKILL.md +90 -55
  8. package/runtime/codex/.codex/skills/deploy-bridge/SKILL.md +25 -0
  9. package/runtime/codex/.codex/skills/handoff/SKILL.md +6 -2
  10. package/runtime/codex/.codex/skills/save/SKILL.md +21 -3
  11. package/runtime/codex/.codex/skills/scroll/SKILL.md +54 -3
  12. package/runtime/codex/.codex/skills/task/SKILL.md +25 -0
  13. package/runtime/codex/.codex/skills/tui-design/SKILL.md +1 -1
  14. package/runtime/codex/.codex/skills/wrap/SKILL.md +4 -1
  15. package/runtime/codex/.codex/spec-manifest.json +15 -3
  16. package/runtime/codex/AGENTS.md +45 -9
  17. package/runtime/codex/bin/activity-data.sh +1 -1
  18. package/runtime/codex/bin/agent.sh +66 -23
  19. package/runtime/codex/bin/attendant.sh +525 -0
  20. package/runtime/codex/bin/capture-reconcile.sh +67 -0
  21. package/runtime/codex/bin/capture-run.sh +341 -0
  22. package/runtime/codex/bin/codex-render-spec.mjs +15 -4
  23. package/runtime/codex/bin/codex-session-start.sh +45 -3
  24. package/runtime/codex/bin/codex-skill-render.mjs +23 -4
  25. package/runtime/codex/bin/graph-op.sh +719 -49
  26. package/runtime/codex/bin/graph-wal.sh +3 -2
  27. package/runtime/codex/bin/handoff-run.sh +72 -0
  28. package/runtime/codex/bin/handoff-save-egregore.sh +51 -11
  29. package/runtime/codex/bin/index-handoff.sh +26 -17
  30. package/runtime/codex/bin/ingest-graph.sh +80 -0
  31. package/runtime/codex/bin/ingest-surface.html +429 -0
  32. package/runtime/codex/bin/ingest.py +614 -0
  33. package/runtime/codex/bin/ingest.sh +231 -0
  34. package/runtime/codex/bin/ingest_graph.py +776 -0
  35. package/runtime/codex/bin/ingest_surface.py +464 -0
  36. package/runtime/codex/bin/lib/git-sync.sh +2 -6
  37. package/runtime/codex/bin/lib/greeting.sh +157 -22
  38. package/runtime/codex/bin/lib/identity.sh +50 -29
  39. package/runtime/codex/bin/lib/noncode.sh +31 -0
  40. package/runtime/codex/bin/person.py +610 -0
  41. package/runtime/codex/bin/person.sh +448 -0
  42. package/runtime/codex/bin/session-autosave.sh +184 -0
  43. package/runtime/codex/bin/session-log.sh +199 -0
  44. package/runtime/codex/bin/settings.sh +1 -1
  45. package/runtime/codex/manifest.json +19 -1
  46. package/runtime/pi/.codex/hooks/branch-guard.js +242 -34
  47. package/runtime/pi/.codex/skills/activity/SKILL.md +18 -6
  48. package/runtime/pi/.codex/skills/deep-reflect/SKILL.md +90 -55
  49. package/runtime/pi/.codex/skills/deploy-bridge/SKILL.md +25 -0
  50. package/runtime/pi/.codex/skills/handoff/SKILL.md +6 -2
  51. package/runtime/pi/.codex/skills/save/SKILL.md +21 -3
  52. package/runtime/pi/.codex/skills/scroll/SKILL.md +54 -3
  53. package/runtime/pi/.codex/skills/task/SKILL.md +25 -0
  54. package/runtime/pi/.codex/skills/tui-design/SKILL.md +1 -1
  55. package/runtime/pi/.codex/skills/wrap/SKILL.md +4 -1
  56. package/runtime/pi/.codex/spec-manifest.json +15 -3
  57. package/runtime/pi/.pi/APPEND_SYSTEM.md +41 -5
  58. package/runtime/pi/.pi/extensions/egregore.ts +98 -8
  59. package/runtime/pi/.pi/spec-manifest.json +2 -2
  60. package/runtime/pi/AGENTS.md +45 -9
  61. package/runtime/pi/bin/activity-data.sh +1 -1
  62. package/runtime/pi/bin/agent.sh +66 -23
  63. package/runtime/pi/bin/attendant.sh +525 -0
  64. package/runtime/pi/bin/capture-reconcile.sh +67 -0
  65. package/runtime/pi/bin/capture-run.sh +341 -0
  66. package/runtime/pi/bin/codex-render-spec.mjs +15 -4
  67. package/runtime/pi/bin/codex-session-start.sh +45 -3
  68. package/runtime/pi/bin/codex-skill-render.mjs +23 -4
  69. package/runtime/pi/bin/graph-op.sh +719 -49
  70. package/runtime/pi/bin/graph-wal.sh +3 -2
  71. package/runtime/pi/bin/handoff-run.sh +72 -0
  72. package/runtime/pi/bin/handoff-save-egregore.sh +51 -11
  73. package/runtime/pi/bin/index-handoff.sh +26 -17
  74. package/runtime/pi/bin/ingest-graph.sh +80 -0
  75. package/runtime/pi/bin/ingest-surface.html +429 -0
  76. package/runtime/pi/bin/ingest.py +614 -0
  77. package/runtime/pi/bin/ingest.sh +231 -0
  78. package/runtime/pi/bin/ingest_graph.py +776 -0
  79. package/runtime/pi/bin/ingest_surface.py +464 -0
  80. package/runtime/pi/bin/lib/git-sync.sh +2 -6
  81. package/runtime/pi/bin/lib/greeting.sh +157 -22
  82. package/runtime/pi/bin/lib/identity.sh +50 -29
  83. package/runtime/pi/bin/lib/noncode.sh +31 -0
  84. package/runtime/pi/bin/person.py +610 -0
  85. package/runtime/pi/bin/person.sh +448 -0
  86. package/runtime/pi/bin/pi-branch-policy.mjs +164 -4
  87. package/runtime/pi/bin/pi-product-workflows.mjs +31 -2
  88. package/runtime/pi/bin/publish-artifact.sh +14 -0
  89. package/runtime/pi/bin/session-autosave.sh +184 -0
  90. package/runtime/pi/bin/session-log.sh +199 -0
  91. package/runtime/pi/bin/settings.sh +274 -0
  92. package/runtime/pi/manifest.json +20 -1
@@ -15,15 +15,27 @@ remain enough to render a useful answer.
15
15
 
16
16
  1. Verify `bin/agent.sh` exists. If it does not, say this is not an Egregore
17
17
  checkout.
18
- 2. Run `bin/agent.sh sync`.
19
- 3. Resolve the requested handle:
18
+ 2. If the request is `activity done N`, `activity expire N`, or
19
+ `activity reopen N`, fetch `bin/activity-data.sh` to a temporary JSON file,
20
+ map `N` to the corresponding `handoffs_to_me[N-1].sessionId`, and run:
21
+
22
+ ```bash
23
+ bash bin/activity-action.sh <done|expire|reopen> "<session-id>"
24
+ ```
25
+
26
+ Report the resulting topic and state. Never accept a raw session ID from the
27
+ visible command when a numbered activity item is available; the number keeps
28
+ the mutation tied to what the user just saw. In local mode, preserve the
29
+ script's explicit unavailable result.
30
+ 3. Run `bin/agent.sh sync`.
31
+ 4. Resolve the requested handle:
20
32
  - If the user named a person, match it against `memory/people/*.md`.
21
33
  - Otherwise use `.egregore-state.json` `github_username`, then git user
22
34
  fallback.
23
- 4. Run `bash bin/activity-data.sh [handle]` with network escalation and capture
35
+ 5. Run `bash bin/activity-data.sh [handle]` with network escalation and capture
24
36
  stdout as JSON. This command performs the graph API call internally; a
25
37
  normal sandboxed Codex shell can make a healthy graph look unreachable.
26
- 5. Classify the graph status:
38
+ 6. Classify the graph status:
27
39
 
28
40
  ```bash
29
41
  node bin/codex-skill-render.mjs classify-graph --mode connected
@@ -37,7 +49,7 @@ say Codex graph network access was not granted; do not claim the graph itself
37
49
  was unreachable. Do not retry for `missing_config`, `auth_error`, or
38
50
  `server_error`; render the clear reason instead.
39
51
 
40
- 6. Render the card with:
52
+ 7. Render the card with:
41
53
 
42
54
  ```bash
43
55
  node bin/codex-skill-render.mjs activity-card <json-file>
@@ -47,7 +59,7 @@ Paste the rendered card exactly in the visible response, preferably in a
47
59
  `text` fenced block. Do not paraphrase the card into bullets unless the user
48
60
  asks for a summary.
49
61
 
50
- 7. Offer one compact focus prompt:
62
+ 8. Offer one compact focus prompt:
51
63
  - `Handoffs` - open pending handoffs.
52
64
  - `Questions` - answer or inspect pending questions.
53
65
  - `Recent work` - inspect sessions and wraps.
@@ -1,74 +1,109 @@
1
1
  ---
2
2
  name: deep-reflect
3
- description: Cross-reference an insight against the Egregore knowledge base using Codex-native staged analysis when the user invokes /deep-reflect or $deep-reflect.
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. Use this for evidence-based analysis of how a new
9
- insight relates to the existing knowledge base.
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
- ## Modes
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
- - empty request: deep mode.
14
- - `focused ...`: focused topic mode.
15
- - `quick ...` or `category: content`: quick mode.
17
+ ## Modes
16
18
 
17
- Detect directed questions when the user asks how, why, what something means, or
18
- about a relationship. Preserve the user's lens while still surfacing important
19
- signals outside the lens.
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 first. In local mode, do a lightweight reflection
24
- from memory files and do not call graph, batch graph, or notification
25
- scripts.
26
- 2. In all modes, run `bin/agent.sh search "$TOPIC" -n 6` — hybrid content
27
- recall over the whole memory repo. Feed strong hits into the candidate
28
- set; in local mode this is the primary context source.
29
- 3. In connected mode, additionally gather graph context with `bin/graph.sh`
30
- and suppress raw JSON. Query recent sessions, active quests, recent
31
- artifacts, decisions, the topic landscape, and the full artifact
32
- landscape.
33
- 4. If the graph is unavailable or has fewer than about ten artifacts, fall back
34
- to lightweight reflection and say why in one line.
35
- 5. Select candidate artifacts. Prefer title, type, topics, quest, author, and
36
- date metadata first; fetch file contents only for the selected subset.
37
- 6. Use Codex multi-agent or subagent tooling only if it is available in the
38
- current session. If not, run a single-model staged analysis:
39
- - candidate selection summary
40
- - evidence extraction summary
41
- - signal analysis
42
- - final synthesis
43
- 7. Classify signals as tension, convergence, gap, dependency, phase shift,
44
- redundancy, emergence, reinforcement, or a named custom type.
45
- 8. Write a markdown artifact under `memory/knowledge/deep-reflect/` with
46
- frontmatter for run id, mode, lens, author, created time, and selected
47
- evidence paths.
48
- 9. In connected mode, write best-effort graph edges with `bin/graph.sh` or
49
- `bin/graph-batch.sh`. Use `TENSION_WITH` for conflict signals and
50
- `RELATES_TO` for other signals.
51
- 10. Save memory and repo changes with `bin/agent.sh save --message "Deep reflect: $TOPIC" --topic "$TOPIC"`.
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
- Lead with the strongest finding, then list primary signals, evidence paths, and
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
- - Use a 72-column outer box with standard top/separator/content/bottom lines.
62
- - Header: `DEEP REFLECT`, author, and date.
63
- - Body: lens/topic, strongest finding, signal counts by type, selected evidence
64
- count, artifact path, and recommended next action.
65
- - Footer: saved/pushed state. In connected mode include graph-link state when
66
- available; in local mode omit graph language.
67
- - Do not show raw graph JSON or replace the confirmation box with plain prose.
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
- - Never show raw graph JSON.
72
- - Do not claim evidence you did not inspect.
73
- - Keep intermediate summaries explicit so the user can audit the reasoning.
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, says they are done, asks to hand off work, or wants to pass context to a teammate or future self.
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/handoff-run.sh --author "$AUTHOR" --topic "$TOPIC" ${RECIPIENT_ARG} < "$BODY_FILE"
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. If there are no repo or memory changes, say everything is already saved and
24
- stop.
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 fence, stable URL, and local
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 fence tag to the
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 fence:
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: 'Fallback Codex adapter for the Egregore tui-design workflow.'
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": "c71340e68c9e",
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": "5c0953aee955",
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": "e1db878ccaee",
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
  {
@@ -23,6 +23,24 @@ When a user reports broken or missing framework behavior, the first question is
23
23
 
24
24
  ---
25
25
 
26
+ ## Cross-Runtime Compatibility
27
+
28
+ Framework behavior must work across Claude Code, Codex, and Pi Egregores. Put
29
+ shared mechanics in runtime-neutral `bin/` scripts; keep `.claude/`, `.codex/`,
30
+ and `.pi/` as thin adapters to those mechanics. When changing startup, session
31
+ lifecycle, capture, skills, or commands, trace all three runtime entry points
32
+ and add or update a parity test. Do not call a framework change complete based
33
+ on one runtime alone. Regenerate derived Codex and Pi specifications or runtime
34
+ bundles whenever their sources change.
35
+
36
+ ---
37
+
38
+ ## Voice
39
+
40
+ 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.
41
+
42
+ ---
43
+
26
44
  ## On Launch — MANDATORY FIRST ACTION
27
45
 
28
46
  The project-local Pi extension renders the Egregore startup card (identity, handoffs, team activity) inside Pi via `bin/pi-session-start.sh`. This works for direct `pi` launches and launcher-managed sessions. 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 outside Pi, run `bash bin/pi-session-start.sh --card`.
@@ -73,19 +91,22 @@ If on develop after two messages, create a branch immediately from whatever cont
73
91
 
74
92
  ### Branch-guard protocol
75
93
 
76
- The `.pi/extensions/egregore.ts` `tool_call` gate (loaded after Pi project trust) denies writes, patches, and commits on `develop`/`main`/`master`. When it fires, choose between two paths based on how clear the topic is:
94
+ The `.pi/extensions/egregore.ts` `tool_call` gate (loaded after Pi project trust) protects project writes on `develop`/`main`/`master`. Its block message is operational guidance, not a reason to interrupt the user with routine Git choices:
77
95
 
78
- - **Topic is obvious from the last turn** (user said "fix X", "add Y feature") → auto-branch silently with `bin/agent.sh branch --topic "<topic>"` (or the git checkout fallback), then continue. Say one sentence ("Creating `dev/{author}/{slug}`.") so the user isn't confused about why a new branch appeared.
79
- - **Topic is ambiguous** (open-ended exploration, user didn't specify what we're building yet) → ask **before** branching, in plain text with numbered options (Pi has no built-in structured question tool):
96
+ - **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.
97
+ - **Topic is genuinely ambiguous** → ask only for the topic, using compact numbered options:
80
98
 
81
99
  ```text
82
- Need a working branch first. Topic?
100
+ What should I call this work?
83
101
  1. <suggested slug from context>
84
102
  2. <alternative slug>
85
103
  3. Other: (name it)
86
104
  ```
87
105
 
88
106
  Wait for the reply, then branch.
107
+ - **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.
108
+
109
+ 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.
89
110
 
90
111
  If Pi project resources are disabled, follow the same discipline as a standing instruction: never write or commit on develop/main/master.
91
112
 
@@ -106,7 +127,22 @@ In connected mode, infrastructure credentials (Neo4j, Telegram) live on the API
106
127
 
107
128
  ## Knowledge Graph
108
129
 
109
- **Connected mode only.** Always use `bin/graph.sh` for Neo4j queries — never construct curl calls directly. See DEVELOPMENT.md §1 for usage examples and current schema. In local mode there is no graph; read `memory/` directly.
130
+ **Connected mode only.** For the following intents, the named read must be the
131
+ first retrieval action. Run the exact command with its safe default limit before
132
+ opening files, running broad grep, inspecting `graph-op.sh`, or writing Cypher:
133
+
134
+ - current work addressed to someone → `bash bin/graph-op.sh open-handoffs "<user>"`
135
+ - unanswered questions for someone → `bash bin/graph-op.sh pending-questions "<user>"`
136
+ - handoff → implementation → branch/PR/direction → `bash bin/graph-op.sh lineage "<topic>"`
137
+ - company/person/topic across meetings → `bash bin/graph-op.sh meeting-history "<entity-or-topic>"`
138
+
139
+ A question about calls, meetings, transcripts, demos, or how a conversation
140
+ evolved is always `meeting-history` intent when it names a company, person, or
141
+ topic—even when it does not ask for "current" or "live" state. Pass the shortest
142
+ discriminative entity or topic (for example, `meeting-history "42CAP"`), not the
143
+ whole question.
144
+
145
+ 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.
110
146
 
111
147
  ---
112
148