بنقرة واحدة
sync
Consolidate session debriefs into a single source of truth (SSOT). Run once daily from the cortex repo.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Consolidate session debriefs into a single source of truth (SSOT). Run once daily from the cortex repo.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Capture a structured session summary and send it to the cortex inbox. Run at the end of any Claude Code session.
Capture a structured session summary and send it to the cortex OACP workspace. Run at the end of any Codex session.
Consolidate session debriefs into a single source of truth (SSOT). Run once daily from the cortex repo.
| name | sync |
| description | Consolidate session debriefs into a single source of truth (SSOT). Run once daily from the cortex repo. |
Read all unprocessed debriefs from the cortex OACP workspace, enrich with project memory and git history, and rewrite SSOT.md — a compact document that any agent can read at session start.
/sync — full consolidation/sync --dry-run — generate the SSOT without writing to diskWhen the user runs /sync, do the following:
Read config.yaml from the cortex repo root. Extract:
oacp_home — path to the OACP home directory (default: $OACP_HOME)project — cortex project name (default: cortex)cortex_dir — path to the cortex repo (default: current directory)enrich_sources.oacp_memory — base dir and glob pattern for project memory filesenrich_sources.git_repos — list of repos to pull git history frommax_ssot_lines — maximum lines for SSOT output (default: 60)If config.yaml does not exist, check for config.example.yaml and prompt the user to create a config.
Scan all agent inboxes in the cortex OACP workspace:
find "$OACP_HOME/projects/cortex/agents" -path "*/inbox/*.yaml" -type f
If no debriefs are found, report "No new debriefs. SSOT unchanged." and exit (no-op).
For each debrief file:
Read memory files matching the configured pattern:
$OACP_HOME/projects/*/memory/*.md
Extract active priorities, open threads, and recent decisions.
For each configured git repo, collect recent activity:
git -C <repo_path> log --oneline --since="<lookback_days> days ago"
Synthesize all inputs (debriefs + memory + git history) into a compact SSOT document. Follow this format:
# SSOT — <YYYY-MM-DD>
> Auto-generated by `/sync`. Do not edit manually.
## Active Work
- <project>: <summary> (<agents involved>). <status>.
## Decisions
- <project>: <decision> (<date>)
## Blockers
- <project>: <blocker description>
## Carry-Forward
- [ ] <project>: <next step>
Constraints:
max_ssot_lines (default 60)Write the generated document to SSOT.md in the cortex repo root.
If --dry-run was specified, display the output without writing.
Delete each processed debrief from its agent inbox:
rm "$OACP_HOME/projects/cortex/agents/<agent>/inbox/<debrief_file>"
Debriefs are deleted after successful SSOT generation, not moved to outbox. The sender's outbox copy (created at send time) serves as the durable record.
Print:
Sync complete: <N> debriefs processed, SSOT.md updated (<line_count> lines).
Sources: <list of agents/projects that contributed>
SSOT.md to the repo root)