feat: Implement Mattermost sync functionality and enhance workspace context management

This commit is contained in:
2026-04-09 14:46:50 -06:00
parent e92c07b8b1
commit 0173e3d376
18 changed files with 740 additions and 7 deletions

View File

@@ -0,0 +1,28 @@
---
description: Force a Mattermost sync using the configured local script
---
Use the configured Mattermost sync command to fetch fresh communication context.
Preferred command sources:
- `FIDELITY_MATTERMOST_SYNC_CMD`
- fallback: `bash scripts/mattermost/sync.sh`
Run the command and use its output as fresh communication context:
!`if [ -n "$FIDELITY_MATTERMOST_SYNC_CMD" ]; then bash -lc "$FIDELITY_MATTERMOST_SYNC_CMD"; elif [ -f scripts/mattermost/sync.sh ]; then bash scripts/mattermost/sync.sh; else echo "No Mattermost sync command is configured."; fi`
Then:
- if the command fails, stop there and do not edit any workspace files
- if no `ai/inbox/mattermost-latest.md` exists after the sync attempt, do not update logs or stable context
- inspect `ai/inbox/mattermost-latest.md` if it exists
- decide whether the new information belongs in today's log, current state, or stable project context
- update the workspace only if the sync succeeded and durable facts were learned
Return:
1. What was synchronized
2. Which files were updated
3. What still needs human confirmation