Files
fidelity-ai-workspace/.opencode/commands/mattermost-sync.md

1.1 KiB

description
description
Force a Mattermost sync using the configured local script

Use the configured Mattermost sync command to fetch fresh communication context into the inbox only.

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 project memory
  • inspect ai/inbox/mattermost-latest.md if it exists
  • extract only project-relevant candidate facts
  • do not update ai/logs/, ai/state/, or ai/context/ in this command
  • if important candidate facts are found, summarize them as promotion candidates for a later explicit command

Return:

  1. What was synchronized
  2. Candidate project facts worth promoting
  3. What still needs human confirmation